From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68460 invoked by alias); 12 Dec 2017 18:05:00 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 68437 invoked by uid 89); 12 Dec 2017 18:05:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mail-oi0-f65.google.com Received: from mail-oi0-f65.google.com (HELO mail-oi0-f65.google.com) (209.85.218.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Dec 2017 18:04:54 +0000 Received: by mail-oi0-f65.google.com with SMTP id w125so14604090oie.7 for ; Tue, 12 Dec 2017 10:04:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xGiLXZOHrXj1q+zfQOZ3JBeBpdO8K48pnuht/PXMfi4=; b=IrR9WRemMKzjESu0rrtFBpzpXC9p5xciPuht9NI3uVOmWoyJQGvvfo3EoXeV5Qds5d NtRv5i/X+hdXuJZyVHD/TmAuFWYCDHne+Lt5471jos2cQpp8ad8A6PKdPlGa8iZiQnMD V5J8ZYforQmDf7UMDBi/pHrzgSXVkiP/dADx/gTSS85O+yxob87IMvMVqhpj/yleyXEb gFqbvIrUIH+kTtoTwACKixvE8Q5vID951AwXiP6kw5OJnDG27xUBBDiEOFuvEwrEV+IO GN8jMSuWOSCMCiS9vWCjOV31IryBjekXsf10I8SYFlOf13wHQTgtTblaYslR7CstDGt4 0vSg== X-Gm-Message-State: AKGB3mIph7RGbPldup7eEcxZoU4+NsClT7R0nIOf0a8SNjK3hvPKCsEy G6qtAV/vxbhfxE/ckByp7bwMUUHs/PI= X-Google-Smtp-Source: ACJfBos3mkt7WcVyHzCgqhFVht3jtjeCRi6hrV2VJDAgcV8XYeVIC+gpNqzuEtl/zYgHUf5xHnplbg== X-Received: by 10.202.48.8 with SMTP id w8mr3620586oiw.284.1513101892193; Tue, 12 Dec 2017 10:04:52 -0800 (PST) Received: from ?IPv6:2602:306:80a3:c890:90c9:bc5c:fe67:c29f? ([2602:306:80a3:c890:90c9:bc5c:fe67:c29f]) by smtp.gmail.com with ESMTPSA id s101sm8228632ota.17.2017.12.12.10.04.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 10:04:51 -0800 (PST) Subject: Re: [PATCH] Don't call double rint from float powf. To: newlib@sourceware.org References: <20171212000802.4190-1-jimw@sifive.com> <1bd39401-e1b2-5be6-4418-9e6a809964da@LGSInnovations.com> <20171212124855.GA9113@calimero.vinschen.de> From: Jim Wilson Message-ID: <833d94f4-5dfb-c7c7-b674-03958543508d@sifive.com> Date: Tue, 12 Dec 2017 18:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171212124855.GA9113@calimero.vinschen.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2017/txt/msg01282.txt.bz2 On 12/12/2017 04:48 AM, Corinna Vinschen wrote: > On Dec 11 19:37, Craig Howland wrote: >>> + if(x<0.0&&rintf(y)!=y) exc.retval = -HUGE_VAL; >>> } >>> if (_LIB_VERSION == _POSIX_) >>> errno = ERANGE; >> To be most rigorous, "0.0" on the same lines as the rintf() should be "0.0F" >> (as otherwise the comparison strictly should be done in double).  (Not >> addressing the exact change you are making, but is the same class of fix and >> are on the same line of source code.) > > Also, HUGE_VAL is double, so it should better be replaced with HUGE_VALF. The "struct exception" type uses doubles, so this has to be HUGE_VAL. Even with my two patches, we still have extendsfdf2 and truncdfsf2 calls, but those will be much harder to get rid of, as we can't change struct exception without breaking matherr. All of the other soft-float calls are gone though. Jim