From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97928 invoked by alias); 4 Oct 2018 21:17:13 -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 97919 invoked by uid 89); 4 Oct 2018 21:17:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=clarification, H*i:sk:4db6fca, H*f:sk:4db6fca, H*c:alternative X-HELO: mail-ed1-f51.google.com Received: from mail-ed1-f51.google.com (HELO mail-ed1-f51.google.com) (209.85.208.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Oct 2018 21:17:10 +0000 Received: by mail-ed1-f51.google.com with SMTP id g26-v6so9880406edp.0 for ; Thu, 04 Oct 2018 14:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CelviUWvCZQwFKi/SoUslixN4INCVnZc62xGf08a4pI=; b=TEW9ZCPMap1evWhEuk7qrqbdVgS361NNJ8DUGHtLTnxO5OAt30sICJtTzg98j1sMyu lVNkGMz7yhnncMAXPgEzp0lq2yth3n2edmRe9GPajbijeU3iQemrpicxVx49GLwKgnbB JCIlBhzbrsJvPTkBomstBBqGNyg+yr2dpmF5ucE7ip2lEYBR9Qqsb0i1KwlRZiIcW5Gs mZaGuL9FQjUpqjW27L6dJZ2LgI+iHKRa7yxcrhFNehvCXjC/H9HfwxuOBtJKYmxD0xH/ XIjjSGxfMFtsuwwgdeNQrGG1xszTPmXXAWsbRM78Lj93nSGGbhSG49ORbiPhD4z1MTeo Cdxg== MIME-Version: 1.0 References: <4db6fcae-c909-faf1-6074-e8e2f516c163@netcologne.de> In-Reply-To: <4db6fcae-c909-faf1-6074-e8e2f516c163@netcologne.de> From: Luca Donatini Date: Thu, 04 Oct 2018 21:17:00 -0000 Message-ID: Subject: Re: Unexpected NaN value To: Thomas Koenig Cc: fortran@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-10/txt/msg00021.txt.bz2 Dear Thomas, Many thanks for the clarification! Best regards, Luca Il gio 4 ott 2018, 22:30 Thomas Koenig ha scritto: > 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 >