From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25972 invoked by alias); 3 Sep 2013 22:17:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 25962 invoked by uid 89); 3 Sep 2013 22:17:03 -0000 Received: from mail-qa0-f43.google.com (HELO mail-qa0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 03 Sep 2013 22:17:03 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f43.google.com Received: by mail-qa0-f43.google.com with SMTP id bv4so1626020qab.2 for ; Tue, 03 Sep 2013 15:17:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=GBCK3PkUl+/Nzqq5ZLmcekhFhWjfFYmT3unBHmXjFvc=; b=JMynAXiGlxAHpEKcIACJFNl9zCviRc5SMvelZ3L1c+h/7c/zQl1Trny+tguDQOU0cK 9WNJ3MVaeBC0IpadM0qjp1rYVzokTAKF3Bw0qyeESylN8MduiX7SQ4tWEev3uzlCTxSW yjm6krry5bV0uBs1SrqfgofUqS/bbjbeYhXTog2k1ps5qbeZez0Us+fpHRRp4V3P9ZJ+ otiF1YurkGxO6MjkLymCG6cDeVuz5m87e6hOvbUqSRgmDztLIoA1iFmG3wxvYMwGX6W7 hxZhsEDLUnMLQIUullFoj4dyo5wHWaLZEbmAYxhUca2kfbK3Dl/RdWua5vyTr8yHHPLM bAFQ== X-Gm-Message-State: ALoCoQnBQZRcG7VBWdI9GDmxtLQ/SaJeeUbW3E5ZcQdy1rdIuye9R/l6QmHis2GNbyp/tY0GPhsidGCp+e0fzVkXTDIE5VGxC3yOTXM2VuQANNChL7xfrHvulieCPVSvUPH05+ICU1P1mPJ0smrbqoUe1/xa9brfZMup6f1o3uXKaVoPEEo1ksZ/n8xUDmmkukHcPL3X3bIw4sCtOdQSMlgiHUdzEn8ydA== MIME-Version: 1.0 X-Received: by 10.49.97.202 with SMTP id ec10mr6141042qeb.95.1378246620750; Tue, 03 Sep 2013 15:17:00 -0700 (PDT) Received: by 10.229.128.9 with HTTP; Tue, 3 Sep 2013 15:17:00 -0700 (PDT) In-Reply-To: References: Date: Tue, 03 Sep 2013 22:17:00 -0000 Message-ID: Subject: Re: [PATCH] Fixing improper conversion from sin() to sinf() in optimization mode. From: Cong Hou To: "Joseph S. Myers" Cc: Xinliang David Li , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-09/txt/msg00165.txt.bz2 Could you please tell me how to check the precision of long double in GCC on different platforms? Thank you! Cong On Tue, Sep 3, 2013 at 2:43 PM, Joseph S. Myers wrote: > On Tue, 3 Sep 2013, Xinliang David Li wrote: > >> >From Joseph: >> >> "The >> conversion is not safe for sqrt if the two types are double and long >> double and long double is x86 extended, for example." >> >> This is not reflected in the patch. > > No, the problem is that it tries to reflect it but hardcodes the specific > example I gave, rather than following the logic I explained regarding the > precisions of the types involved, which depend on the target. And since I > only gave a simplified analysis, for two types when this function deals > with cases involving three types, the patch submission needs to include > its own analysis for the full generality of three types to justify the > logic used (as inequalities involving the three precisions). (I suspect > it reduces to the case of two types so you don't need to go into the > details of reasoning about floating point to produce the more general > analysis. But in any case, it's for the patch submitter to give the full > explanation.) > > -- > Joseph S. Myers > joseph@codesourcery.com