summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/spmath/sgl_float.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-01-02 14:39:02 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-01-02 14:39:02 +0000
commitd4452b585fb86c458cd7c3f8f4bba7f5f7994af9 (patch)
tree643c5457d1bb4fb6d582b20f1bd8c5329935d5b9 /sys/arch/hppa/spmath/sgl_float.h
parent0103523c358a53f099d4a8907174e9ce004aa934 (diff)
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.
Diffstat (limited to 'sys/arch/hppa/spmath/sgl_float.h')
-rw-r--r--sys/arch/hppa/spmath/sgl_float.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/hppa/spmath/sgl_float.h b/sys/arch/hppa/spmath/sgl_float.h
index bd6859a2ec3..f20c43bbff9 100644
--- a/sys/arch/hppa/spmath/sgl_float.h
+++ b/sys/arch/hppa/spmath/sgl_float.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgl_float.h,v 1.9 2003/04/10 17:27:59 mickey Exp $ */
+/* $OpenBSD: sgl_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"
@@ -192,10 +192,10 @@
Deposit_sexponent(sgl_value,(exponent op SGL_WRAP))
#define Sgl_setlargestpositive(sgl_value) \
- Sall(sgl_value) = ((FLT_MAX_EXP+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
+ Sall(sgl_value) = ((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
| ((1<<(32-(1+SGL_EXP_LENGTH))) - 1)
#define Sgl_setlargestnegative(sgl_value) \
- Sall(sgl_value) = ((FLT_MAX_EXP+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
+ Sall(sgl_value) = ((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
| ((1<<(32-(1+SGL_EXP_LENGTH))) - 1 ) | (1<<31)
#define Sgl_setnegativeinfinity(sgl_value) \
@@ -203,11 +203,11 @@
((1<<SGL_EXP_LENGTH) | SGL_INFINITY_EXPONENT) << (32-(1+SGL_EXP_LENGTH))
#define Sgl_setlargest(sgl_value,sign) \
Sall(sgl_value) = ((sign) << 31) | \
- (((FLT_MAX_EXP+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
+ (((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
| ((1 << (32-(1+SGL_EXP_LENGTH))) - 1 ))
#define Sgl_setlargest_exponentmantissa(sgl_value) \
Sall(sgl_value) = (Sall(sgl_value) & (1<<31)) | \
- (((FLT_MAX_EXP+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
+ (((SGL_EMAX+SGL_BIAS) << (32-(1+SGL_EXP_LENGTH))) \
| ((1 << (32-(1+SGL_EXP_LENGTH))) - 1 ))
/* The high bit is always zero so arithmetic or logical shifts will work. */
@@ -248,10 +248,10 @@
/* Need to Initialize */
#define Sgl_makequietnan(dest) \
- Sall(dest) = ((FLT_MAX_EXP+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
+ Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
| (1<<(32-(1+SGL_EXP_LENGTH+2)))
#define Sgl_makesignalingnan(dest) \
- Sall(dest) = ((FLT_MAX_EXP+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
+ Sall(dest) = ((SGL_EMAX+SGL_BIAS)+1)<< (32-(1+SGL_EXP_LENGTH)) \
| (1<<(32-(1+SGL_EXP_LENGTH+1)))
#define Sgl_normalize(sgl_opnd,exponent) \