--- a/ShortFloat.st Fri May 08 14:02:08 1998 +0200
+++ b/ShortFloat.st Fri May 08 14:04:07 1998 +0200
@@ -190,6 +190,18 @@
^ self == ShortFloat
"Modified: 23.4.1996 / 16:00:23 / cg"
+!
+
+isIEEEFormat
+ "return true, if this machine represents floats in IEEE format.
+ Currently, no support is provided for non-ieee machines
+ to convert their floats into this (which is only relevant,
+ if such a machine wants to send floats as binary to some other
+ machine).
+ Machines with non-IEEE format are VAXed and IBM370-type systems
+ (among others). Today, most systems use IEEE format floats."
+
+ ^ true "/ this may be a lie
! !
!ShortFloat methodsFor:'arithmetic'!
@@ -407,9 +419,12 @@
float fVal;
fVal = __shortFloatVal(self);
+printf("sself: %f min: %f max: %f\n", fVal, (float)_MIN_INT, (float)_MAX_INT);
if ((fVal >= (float)_MIN_INT) && (fVal <= (float)_MAX_INT)) {
+printf("in range\n");
RETURN ( __MKSMALLINT( (INT)fVal) );
}
+printf("not in range\n");
%}.
^ super asInteger
@@ -776,5 +791,5 @@
!ShortFloat class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.30 1998-05-01 10:50:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.31 1998-05-08 12:04:05 cg Exp $'
! !