From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.oetec.com (mail.oetec.com [108.160.241.186]) by sourceware.org (Postfix) with ESMTPS id 962BF3851C35 for ; Fri, 7 Aug 2020 16:00:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 962BF3851C35 X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-oetec-MailScanner-From: dclarke@blastwave.org X-oetec-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.654, required 6, autolearn=not spam, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, DKIM_VALID_EF -0.10, NICE_REPLY_A -1.46, URIBL_BLOCKED 0.00) X-oetec-MailScanner: Found to be clean X-oetec-MailScanner-ID: 077FxtvR027863 X-oetec-MailScanner-Information: Please contact oetec for more information Received: from [172.16.35.2] (CPEac202e7325b3-CMac202e7325b0.cpe.net.cable.rogers.com [99.253.170.241]) (authenticated bits=0) by mail.oetec.com (8.15.2/8.15.2/Debian-8) with ESMTPSA id 077FxtvR027863 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 7 Aug 2020 11:59:57 -0400 Subject: Re: making double type default to 80 or 128 bytes To: gcc-help@gcc.gnu.org References: From: Dennis Clarke Message-ID: <9a66e245-61cf-9eb2-f4f5-3fc7d10d9ff8@blastwave.org> Date: Fri, 7 Aug 2020 15:59:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2020 16:00:04 -0000 On 8/7/20 2:59 PM, dave via Gcc-help wrote: > > Is it possible to modify the gcc compiler so that recompiling existing > code and libraries will produce longer doubles (80 or 128 bytes) > > without having to re declare all the double types.  This may be a stupid > question but I'm looking for a quick fix to see if extra > > precision helps with an optimization problem. Thanks. There is no such thng as an 80 byte double. The standards state that we shall use floating point types which are of specific bit widths and all of those are perfectly aligned on perfect power of two bit widths. These range from 16 bits to 256 bit width. To date I have not seen hardware which natively supports the 256-bit floating point type. The IBM POWER9 processor as well as the RISC-V and Fujitsu SPARC provide hardware for the 128-bit width and they seem to work very well indeed. The 80-bit thing to which you refer is a hack put in place by the intel/x86 world simply because the hardware can not properly handle anything larger. It should not exist at all in if we use the floating point standards. You are far better off using gmp and mpfr and mpc ( et. al. ) to attain a wider degree of floating point precision but you will never get very far using x86 hardware. It simply can not do that and the 80-bit hack is just that, a hack. Dennis