--- a/LimitedPrecisionReal.st Wed Jun 25 18:30:11 2014 +0200
+++ b/LimitedPrecisionReal.st Wed Jun 25 18:54:33 2014 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1994 by Claus Gittinger
All Rights Reserved
@@ -39,27 +41,34 @@
Abstract superclass for any-precision floating point numbers (i.e. Float and Double).
Due to historic reasons, ST/X's Floats are what Doubles are in ST-80.
- This may change soon (implementing LPReal is a first step towards this).
+ The reason is that in some Smalltalk's, double floats are called Float, and no single float exists (VSE, V'Age).
+ This may change in the future.
Range and Precision of Storage Formats:
- Format | Class | Significant Digits (Binary) | Smallest Pos Number | Largest Pos Number | Significant Digits (Decimal)
- -------+------------+-----------------------------+---------------------+--------------------+------------------------------
- single | ShortFloat | 24 | 1.175... 10-38 | 3.402... 10+38 | 6-9
- -------+------------+-----------------------------+---------------------+--------------------+------------------------------
- double | Float | 53 | 2.225... 10-308 | 1.797... 10+308 | 15-17
- -------+------------+-----------------------------+---------------------+--------------------+------------------------------
- double | LongFloat | 113 | 3.362... 10-4932 | 1.189... 10+4932 | 33-36
- ext | | | | |
- (SPARC)| | | | |
- -------+ |-----------------------------+---------------------+--------------------+------------------------------
- double | | 64 | 3.362... 10-4932 | 1.189... 10+4932 | 18-21
- ext | | | | |
- (x86) | | | | |
- -------+------------+-----------------------------+---------------------+--------------------+------------------------------
- -- | LargeFloat | arbitrary | arbitrarily small | arbitrarily large | arbitrary
- -------+------------+-----------------------------+---------------------+--------------------+------------------------------
+ Format | Class | Array Class | Bits / Significant | Smallest Pos Number | Largest Pos Number | Significant Digits
+ | | | (Binary) | | | (Decimal)
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ half | -- | HalfFloatArray | 16 / 11 | 6.10... x 10−5 | 6.55... x 10+5 | 3.3
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ single | ShortFloat | FloatArray | 32 / 24 | 1.175...x 10-38 | 3.402... 10+38 | 6-9
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ double | Float | DoubleArray | 64 / 53 | 2.225...x 10-308 | 1.797... 10+308 | 15-17
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ double | LongFloat | -- | 128 / 113 | 3.362...x 10-4932 | 1.189... 10+4932 | 33-36
+ ext | | | | | |
+ (SPARC)| | | | | |
+ -------+ | |---------------------+---------------------+--------------------+--------------------
+ double | | | 96 / 64 | 3.362...x 10-4932 | 1.189... 10+4932 | 18-21
+ ext | | | | | |
+ (x86) | | | | | |
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ -- | LargeFloat | -- | arbitrary | arbitrarily small | arbitrarily large | arbitrary
+ -------+------------+-----------------+---------------------+---------------------+--------------------+--------------------
+ HalfFloats are only supported in fixed array containers. This was added for OpenGL and other graphic librariess which allow
+ for texture, and vertex data to be passed quickly in that format.
+ Long- and LargeFloat are not supported array containers. These formats are seldom used for buld data.
[author:]
Claus Gittinger
@@ -1083,7 +1092,6 @@
^ 0
! !
-
!LimitedPrecisionReal methodsFor:'testing'!
isFinite
@@ -1211,11 +1219,11 @@
!LimitedPrecisionReal class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.74 2014-05-14 14:59:55 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.75 2014-06-25 16:54:33 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.74 2014-05-14 14:59:55 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.75 2014-06-25 16:54:33 cg Exp $'
! !