From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org Tue Aug 23 18:00:58 2016 Return-Path: X-Original-To: sc22wg5-dom8 Delivered-To: sc22wg5-dom8@www.open-std.org Received: by www.open-std.org (Postfix, from userid 521) id 424D09DB161; Tue, 23 Aug 2016 18:00:58 +0200 (CEST) Delivered-To: sc22wg5@open-std.org Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by www.open-std.org (Postfix) with ESMTP id 938913586F9 for ; Tue, 23 Aug 2016 18:00:55 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id f65so168374519wmi.0 for ; Tue, 23 Aug 2016 09:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bris-ac-uk.20150623.gappssmtp.com; s=20150623; h=date:from:message-id:to:subject:reply-to; bh=6hp1a5iuD/vkGSE4EEL2Qif2FTsGFZzBbMEZ2sOF8Dw=; b=dFb+xTVnG83ZKu5ts/855aTaPJnyyuc1heqAYClFYJbxfFX9rTiY6XVJflvoKwZq5b bv0eVVI/zWivLrSOvCGJ86jLeUVcHurjR1BkDksuFinzJLmm71EvJgyyElrVfwgltO2k npA2yIcYy4gzf1ylkKmP7fTIdWuHk5j0WEVxmzFbgw4ibsavAlwEJcKzdslyzkxzJQFf 46ZgmBXRlqRREOY5PxWq0kxyOxr9DvbcO1K4M6znlv+KwMW+0btaGX/ylf32QU6OupWj 8H7mbmoY0GRf5SclMMGyptKxOYwW++6Hq1PSgXuUkq2Yu3yIU3uqOBNacFu6L9g4JiKT +LLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:message-id:to:subject:reply-to; bh=6hp1a5iuD/vkGSE4EEL2Qif2FTsGFZzBbMEZ2sOF8Dw=; b=LDPfDwk3qbWg1vRbubcItif7duS3nt/t5XcCRMLXlnQPPLDBfkytQ9D9UQu4Wt5VPx FCKcqObdzxSvn9+a5YtoIAdVjN3EkjdGxAjXssk0z9PeTRa1SCqtjS/Uzzs22NTaurna LwrPmVgDWuX27WnZ0PdpPHFjQH/DEio+z/+FQRI6b3aTTVfLbVRWy/ZfQZoi2CsnDU1z fkvDtIvvBsCZ2g5/D6sN2zPAIh9Lge8MxPqSIm69JsM9sA/YkS5mbTATU8FB+FIdK9Iz KG5RGTXQ6CieTBgO9iyJR5KJVihYvFOt2Y+TB2RRYYKenKrFgSNwGhQBtWQj+ai/yTH7 1zyw== X-Gm-Message-State: AEkoouuklCbtVv3e/oxH8KM+u8LObba3BAkYY1OE1brMEK8m8iGJ2xrvL0+IbsuDNl3ZVuOu X-Received: by 10.195.2.42 with SMTP id bl10mr22544416wjd.21.1471968054901; Tue, 23 Aug 2016 09:00:54 -0700 (PDT) Received: from mech-as222.men.bris.ac.uk (mech-as222.men.bris.ac.uk. [137.222.170.4]) by smtp.gmail.com with ESMTPSA id r16sm28234053wme.16.2016.08.23.09.00.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 09:00:54 -0700 (PDT) Received: from mech-as222.men.bris.ac.uk (localhost [127.0.0.1]) by mech-as222.men.bris.ac.uk (8.15.2/8.15.2) with ESMTP id u7NG0rvB078834 for ; Tue, 23 Aug 2016 17:00:53 +0100 (BST) (envelope-from mexas@mech-as222.men.bris.ac.uk) Received: (from mexas@localhost) by mech-as222.men.bris.ac.uk (8.15.2/8.15.2/Submit) id u7NG0rqL078833 for sc22wg5@open-std.org; Tue, 23 Aug 2016 17:00:53 +0100 (BST) (envelope-from mexas) Date: Tue, 23 Aug 2016 17:00:53 +0100 (BST) From: Anton Shterenlikht Message-Id: <201608231600.u7NG0rqL078833@mech-as222.men.bris.ac.uk> To: sc22wg5@open-std.org Subject: edits to clarify SQRT treatment of negative zero, for comments Reply-To: mexas@bris.ac.uk Sender: owner-sc22wg5@open-std.org Precedence: bulk Dear WG5/J3 Below is a draft of my paper to J3. I wanted to post it here for comments first. This has been discussed in COMP-FORTRAN-90, the thread starts at: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1608&L=comp-fortran-90&F=&S=&P=1866 Anton **************************** To: J3 J3/16-xxx From: Anton Shterenlikht Subject: clarification of SQRT text regarding minus zero Date: 23-JUL-2016 Reference: J3/16-007r1 Discussion: ----------- Description of SQRT, [424:6-8], does not "explicitly" mention that negative zero is distinguished, on processors which distinguish positive and negative zero. According to [56:21-25] this means that positive and negative zero actual arguments are treated as mathematically equivalent by SQRT. This is wrong because LOG does distinguish positive and negative zero [394:31-395:3], and SQRT(X) is mathematically equivalent to EXP( 0.5 * LOG(X) ). Also [424:6-7], the word "principal" in the sentence "A result of type complex is the principal value with the real part greater or equal to zero." seems redundant, as "principal" in this context means precisely "with the real part greater or equal to zero". I suggest to replace some text under SQRT Result Value, and make it very similar to that of LOG with regards to minus zero. Edits to J3/16-007r1: --------------------- Replace the last 2 sentences of [424:5-8 13.9.182p5] with "A result of type complex is the value with the real part greater than or equal to zero. If the real part of X is less than zero and the imaginary part of X is zero, then the imaginary part of the result is positive if the imaginary part of X is positive real zero or the processor does not distinguish between positive and negative zero, and negative if the imaginary part of X is negative real zero."