From owner-freebsd-ppc@FreeBSD.ORG Thu Nov 13 04:24:17 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B84781065670 for ; Thu, 13 Nov 2008 04:24:17 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout018.mac.com (asmtpout018.mac.com [17.148.16.93]) by mx1.freebsd.org (Postfix) with ESMTP id A01438FC13 for ; Thu, 13 Nov 2008 04:24:17 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from [192.168.1.95] (209-128-86-226.bayarea.net [209.128.86.226]) by asmtp018.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KA9006HL5GBSP40@asmtp018.mac.com> for freebsd-ppc@freebsd.org; Wed, 12 Nov 2008 19:24:12 -0800 (PST) Message-id: <46B90E82-B28B-42BB-8D33-49F5C012262A@mac.com> From: Marcel Moolenaar To: Andreas Tobler In-reply-to: <491B337D.5010901@fgznet.ch> Date: Wed, 12 Nov 2008 19:24:10 -0800 References: <491B337D.5010901@fgznet.ch> X-Mailer: Apple Mail (2.929.2) Cc: FreeBSD PowerPC ML Subject: Re: ppc float.h X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 04:24:17 -0000 On Nov 12, 2008, at 11:50 AM, Andreas Tobler wrote: > Hello, > > can somebody explain why we have these defines in sys/powerpc/ > include/float.h ? > > #define LDBL_MANT_DIG DBL_MANT_DIG > #define LDBL_EPSILON DBL_EPSILON > #define LDBL_DIG DBL_DIG > #define LDBL_MIN_EXP DBL_MIN_EXP > #define LDBL_MIN DBL_MIN > #define LDBL_MIN_10_EXP DBL_MIN_10_EXP > #define LDBL_MAX_EXP DBL_MAX_EXP > #define LDBL_MAX DBL_MAX > #define LDBL_MAX_10_EXP DBL_MAX_10_EXP Because "long double" on PowerPC is the same as "double". This is dictated by the compiler: mini-g4% gcc -E -dM -xc /dev/null | grep DBL | grep DIG #define __DBL_DIG__ 15 #define __LDBL_DIG__ 15 #define __LDBL_MANT_DIG__ 53 #define __DBL_MANT_DIG__ 53 -- Marcel Moolenaar xcllnt@mac.com