atom feed9 messages in org.freebsd.freebsd-ppcRe: ppc float.h
FromSent OnAttachments
Andreas ToblerNov 12, 2008 11:49 am 
Peter GrehanNov 12, 2008 4:59 pm 
Marcel MoolenaarNov 12, 2008 7:23 pm 
Andreas ToblerNov 13, 2008 11:12 am 
Andreas ToblerNov 13, 2008 11:13 am 
Andreas ToblerNov 14, 2008 1:02 pm 
Peter GrehanNov 14, 2008 2:42 pm 
Andreas ToblerNov 16, 2008 11:01 am 
Marcel MoolenaarNov 16, 2008 11:20 am 
Subject:Re: ppc float.h
From:Marcel Moolenaar (xcl@mac.com)
Date:Nov 12, 2008 7:23:47 pm
List:org.freebsd.freebsd-ppc

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