From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112400 invoked by alias); 4 Oct 2018 20:30:24 -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 101367 invoked by uid 89); 4 Oct 2018 20:30:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*tkoenig, Hx-languages-length:308, H*f:sk:CAC5oXR, H*i:sk:CAC5oXR X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Oct 2018 20:30:03 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id C753D12785; Thu, 4 Oct 2018 22:30:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1538685000; bh=n7Xk23fUeuXUbqqs3hAj6JTNY2O7Tql1i8Q7SKLd4vk=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To:From; b=Ayp3oNcM/pTxKFPgfqR3M0JtwpFH4fzLJh4KCyF8AHvBzMqTAlunXeGEVh+5CGa8m 8l88KRY+ZiUu7BMDJ2TRgCNLRTzwUcvZjNMrKgejS12oQyCAG7K4MxXjq5JQO/wAhe vtZFGdD2vFHmRUUA9/lmkHtMykdWaxEFGvuSOjB4RBNtSjuWpTfVh3rze6QjEB1K9Z 8FJAfBlfxCsDxLNjm+aHUVNMM3rSeiNVgrzxz9nAS9rCxlIAydB36Np9QkxsEevM7q gpcQHvqD6ybd7QhUIpnAlkS/EbffsKbIEPKcp2dU9Vf4ko96zCbbCt/GS4UYxD8fm5 0gMKcl+RivOVQ== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id C3D1011D89; Thu, 4 Oct 2018 22:30:00 +0200 (CEST) Received: from [78.35.136.172] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5bb67848-5f8a-7f0000012729-7f000001b944-1 for ; Thu, 04 Oct 2018 22:30:00 +0200 Received: from [192.168.178.68] (xdsl-78-35-136-172.netcologne.de [78.35.136.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Thu, 4 Oct 2018 22:29:59 +0200 (CEST) Subject: Re: Unexpected NaN value To: Luca Donatini , fortran@gcc.gnu.org References: From: Thomas Koenig Message-ID: <4db6fcae-c909-faf1-6074-e8e2f516c163@netcologne.de> Date: Thu, 04 Oct 2018 20:30:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-10/txt/msg00020.txt.bz2 Hi Luca, > program test > implicit none > > real :: a = -1.57079637 > real :: b = 2.1 > > write(*,*) cos(a) > write(*,*) cos(a) **(2*b) > > end program cos(a) happens to be negative, so cos(a)**(2*b) is undefined, because 2*b is real. And yes, this is expected. Regards Thomas