class: LongFloat
authorClaus Gittinger <cg@exept.de>
Mon, 27 May 2013 10:14:16 +0200
changeset 15327 0615616bb8da
parent 15326 7cc303092044
child 15328 66f02e4d3701
class: LongFloat changed: #numBitsInExponent #numBitsInIntegerPart #numBitsInMantissa
LongFloat.st
--- a/LongFloat.st	Mon May 27 10:13:50 2013 +0200
+++ b/LongFloat.st	Mon May 27 10:14:16 2013 +0200
@@ -507,27 +507,30 @@
 numBitsInExponent
     "answer the number of bits in the exponent
      i386: This is an 80bit longfloat stored in 96 bits (upper 16 bits are unused),
-	   where 15 bits are available in the exponent (i bit is ignored):
-	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+           where 15 bits are available in the exponent (i bit is ignored):
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+     x86_64: This is an 80bit longfloat stored in 128 bits (upper 48 bits are unused),
+           where 1+63 bits are available in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
     if (sizeof(LONGFLOAT) == 10) {
-	RETURN (__mkSmallInteger(15));  /* i386 - WIN32 */
+        RETURN (__mkSmallInteger(15));  /* i386 - WIN32 */
     }
     if (sizeof(LONGFLOAT) == 12) {
-	RETURN (__mkSmallInteger(15));  /* i386 */
+        RETURN (__mkSmallInteger(15));  /* i386 */
     }
     if (sizeof(LONGFLOAT) == 16) {
 #ifdef __x86_64__
-	RETURN (__mkSmallInteger(15));  /* amd64, i386-64bit */
+        RETURN (__mkSmallInteger(15));  /* amd64, i386-64bit */
 #else
-	RETURN (__mkSmallInteger(15));  /* sparc */
+        RETURN (__mkSmallInteger(15));  /* sparc */
 #endif
     }
 %}.
     "systems without longFloat support use doubles instead"
     self basicNew basicSize == Float basicNew basicSize ifTrue:[
-	^ Float numBitsInExponent
+        ^ Float numBitsInExponent
     ].
     self error:'missing definition'  "ifdef missing in above primitive code for this architecture"
 
@@ -539,27 +542,30 @@
 numBitsInIntegerPart
     "answer the number of bits in the integer part of the mantissa
      i386: This is an 80bit longfloat stored in 96 bits (upper 16 bits are unused),
-	   where 1 bit is used for the integer part in the mantissa:
-	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+           where 1 bit is used for the integer part in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+     x86_64: This is an 80bit longfloat stored in 128 bits (upper 48 bits are unused),
+           where 1+63 bits are available in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
     if (sizeof(LONGFLOAT) == 10) {
-	RETURN (__mkSmallInteger(1));   /* i386 - WIN32 */
+        RETURN (__mkSmallInteger(1));   /* i386 - WIN32 */
     }
     if (sizeof(LONGFLOAT) == 12) {
-	RETURN (__mkSmallInteger(1));   /* i386 */
+        RETURN (__mkSmallInteger(1));   /* i386 */
     }
     if (sizeof(LONGFLOAT) == 16) {
 #ifdef __x86_64__
-	RETURN (__mkSmallInteger(1));   /* amd64 */
+        RETURN (__mkSmallInteger(1));   /* amd64 */
 #else
-	RETURN (__mkSmallInteger(0));   /* sparc */
+        RETURN (__mkSmallInteger(0));   /* sparc */
 #endif
     }
 %}.
     "systems without longFloat support use doubles instead"
     self basicNew basicSize == Float basicNew basicSize ifTrue:[
-	^ Float numBitsInIntegerPart
+        ^ Float numBitsInIntegerPart
     ].
     self error:'missing definition'  "ifdef missing in above primitive code for this architecture"
 
@@ -571,30 +577,33 @@
 numBitsInMantissa
     "answer the number of bits in the mantissa
      i386: This is an 80bit longfloat stored in 96 bits (upper 16 bits are unused),
-	   where 1+63 bits are available in the mantissa:
-	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+           where 1+63 bits are available in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+     x86_64: This is an 80bit longfloat stored in 128 bits (upper 48 bits are unused),
+           where 1+63 bits are available in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
      sparc: This is an 128bit longfloat,
-	   where 1+112 bits are available in the mantissa:
-	00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
+           where 1+112 bits are available in the mantissa:
+        00000000 00000000 seeeeeee eeeeeeee immmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm mmmmmmmm
     "
 %{
     if (sizeof(LONGFLOAT) == 10) {
-	RETURN (__mkSmallInteger(64));  /* i386 - WIN32 */
+        RETURN (__mkSmallInteger(64));  /* i386 - WIN32 */
     }
     if (sizeof(LONGFLOAT) == 12) {
-	RETURN (__mkSmallInteger(64));  /* i386 */
+        RETURN (__mkSmallInteger(64));  /* i386 */
     }
     if (sizeof(LONGFLOAT) == 16) {
 #ifdef __x86_64__
-	RETURN (__mkSmallInteger(64));  /* amd64 */
+        RETURN (__mkSmallInteger(64));  /* amd64 */
 #else
-	RETURN (__mkSmallInteger(112)); /* sparc */
+        RETURN (__mkSmallInteger(112)); /* sparc */
 #endif
     }
 %}.
     "systems without longFloat support use doubles instead"
     self basicNew basicSize == Float basicNew basicSize ifTrue:[
-	^ Float numBitsInMantissa
+        ^ Float numBitsInMantissa
     ].
     self error:'missing definition'  "ifdef missing in above primitive code for this architecture"
 
@@ -2692,11 +2701,11 @@
 !LongFloat class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.79 2013-05-21 20:45:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.80 2013-05-27 08:14:16 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.79 2013-05-21 20:45:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/LongFloat.st,v 1.80 2013-05-27 08:14:16 cg Exp $'
 ! !