From d4452b585fb86c458cd7c3f8f4bba7f5f7994af9 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Fri, 2 Jan 2004 14:39:02 +0000 Subject: apparently my understanding of '{FLT,DBL,LDBL}_{MIN,MAX}_EXP' ahs been wrong and thus proven by many and there change it back to what it is meaning explained in http://www-ccs.ucsd.edu/c/float.html . also fix spmath to use it's own consts instead of (now) off by one float.h values thus to avoid any kind of binary changes. --- sys/arch/hppa/spmath/dbl_float.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/arch/hppa/spmath/dbl_float.h') diff --git a/sys/arch/hppa/spmath/dbl_float.h b/sys/arch/hppa/spmath/dbl_float.h index c802f184293..e0cbbe356dd 100644 --- a/sys/arch/hppa/spmath/dbl_float.h +++ b/sys/arch/hppa/spmath/dbl_float.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dbl_float.h,v 1.9 2003/04/10 17:27:58 mickey Exp $ */ +/* $OpenBSD: dbl_float.h,v 1.10 2004/01/02 14:39:01 mickey Exp $ */ /* (c) Copyright 1986 HEWLETT-PACKARD COMPANY To anyone who acknowledges that this file is provided "AS IS" @@ -315,16 +315,16 @@ Deposit_dexponent(dbl_value,(exponent op DBL_WRAP)) #define Dbl_setlargestpositive(dbl_valueA,dbl_valueB) \ - Dallp1(dbl_valueA) = ((DBL_MAX_EXP+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ + Dallp1(dbl_valueA) = ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ | ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 ); \ Dallp2(dbl_valueB) = 0xFFFFFFFF #define Dbl_setlargestnegative(dbl_valueA,dbl_valueB) \ - Dallp1(dbl_valueA) = ((DBL_MAX_EXP+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ + Dallp1(dbl_valueA) = ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ | ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 ) | (1<<31); \ Dallp2(dbl_valueB) = 0xFFFFFFFF #define Dbl_setlargest_exponentmantissa(dbl_valueA,dbl_valueB) \ Deposit_dexponentmantissap1(dbl_valueA, \ - (((DBL_MAX_EXP+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ + (((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) \ | ((1<<(32-(1+DBL_EXP_LENGTH))) - 1 ))); \ Dallp2(dbl_valueB) = 0xFFFFFFFF @@ -334,7 +334,7 @@ Dallp2(dbl_valueB) = 0 #define Dbl_setlargest(dbl_valueA,dbl_valueB,sign) \ Dallp1(dbl_valueA) = (sign << 31) | \ - ((DBL_MAX_EXP+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) | \ + ((DBL_EMAX+DBL_BIAS) << (32-(1+DBL_EXP_LENGTH))) | \ ((1 << (32-(1+DBL_EXP_LENGTH))) - 1 ); \ Dallp2(dbl_valueB) = 0xFFFFFFFF @@ -426,11 +426,11 @@ /* Need to Initialize */ #define Dbl_makequietnan(desta,destb) \ - Dallp1(desta) = ((DBL_MAX_EXP+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH)) \ + Dallp1(desta) = ((DBL_EMAX+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH)) \ | (1<<(32-(1+DBL_EXP_LENGTH+2))); \ Dallp2(destb) = 0 #define Dbl_makesignalingnan(desta,destb) \ - Dallp1(desta) = ((DBL_MAX_EXP+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH)) \ + Dallp1(desta) = ((DBL_EMAX+DBL_BIAS)+1)<< (32-(1+DBL_EXP_LENGTH)) \ | (1<<(32-(1+DBL_EXP_LENGTH+1))); \ Dallp2(destb) = 0 -- cgit v1.2.3