From f6962ae479f622dcfc6dfb95c52683686bb7170b Mon Sep 17 00:00:00 2001 From: cognet Date: Sun, 20 Mar 2005 00:34:24 +0000 Subject: [PATCH] Bring in a version of float.h more correct for softfloat. --- sys/arm/include/float.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/sys/arm/include/float.h b/sys/arm/include/float.h index 424fb7c146dd..ac5ceb92b27b 100644 --- a/sys/arm/include/float.h +++ b/sys/arm/include/float.h @@ -37,10 +37,16 @@ #ifndef _MACHINE_FLOAT_H_ #define _MACHINE_FLOAT_H_ 1 +#include + +__BEGIN_DECLS +extern int __flt_rounds(void); +__END_DECLS + #define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS (-1) /* indeterminate */ +#define FLT_ROUNDS -1 #define FLT_EVAL_METHOD (-1) /* XXX */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ +#define DECIMAL_DIG 17 /* max precision in decimal digits */ #define FLT_MANT_DIG 24 /* p */ #define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ @@ -62,14 +68,13 @@ #define DBL_MAX 1.7976931348623157E+308 #define DBL_MAX_10_EXP 308 - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.0842021724855044340E-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.3621031431120935063E-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.1897314953572317650E+4932L -#define LDBL_MAX_10_EXP 4932 +#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 #endif /* _MACHINE_FLOAT_H_ */