LimitedPrecisionReal.st
changeset 22288 5a955973c6a9
parent 22212 9a10518551e1
child 22305 4d905f534925
--- a/LimitedPrecisionReal.st	Fri Sep 22 10:28:53 2017 +0200
+++ b/LimitedPrecisionReal.st	Fri Sep 22 10:29:37 2017 +0200
@@ -75,7 +75,7 @@
     =======================
 
     Beginners seem to forget (or never learn?) that flt. point numbers are always APPROXIMATIONs of some value.
-    You may never ever use them when exact results are neeed (i.e. when computing money !!)
+    You may never ever use them when exact results are neeed (i.e. when computing money!!)
     Take a look at the FixedPoint class for that.
     See also 'Float comparison' below.
     
@@ -104,8 +104,8 @@
     The only really portable sizes are IEEE-single and IEEE-double floats (i.e. ShortFloat and Float instances).
     These are supported on all architectures.
     Some do provide an extended precision floating pnt. number,
-    however, the downside is that CPU-architects did not agree on a common format and precision; some use 80 bits,
-    others 96 and others even 128.
+    however, the downside is that CPU-architects did not agree on a common format and precision: 
+    some use 80 bits, others 96 and others even 128.
     See the comments in the LongFloat class for more details.
     We recommend using Float (i.e. IEEE doubles) unless absolutely required,
     and care for machine dependencies in the code otherwise.
@@ -153,7 +153,7 @@
         '%60.58f' printf:{ 1 asFloat exp }      -> '2.718281828459045*090795598298427648842334747314453125'          (64 bits)
         '%60.58f' printf:{ 1 asLongFloat exp }  -> '2.718281828459045235*4281681079939403389289509505033493041992'   (only 80 valid bits on x86)
         
-        '%60.58f' printf:{ 1 asQDouble exp }    -> '2.7182818284590452353602874713526624977572470936999595749669*8'  (>200 bits)
+        '%60.58f' printf:{ 1 asQDouble exp }    -> '2.71828182845904523536028747135266249775724709369995957496698'   (>200 bits)
 
         correct value is:                           2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746
 
@@ -179,7 +179,7 @@
     enough to be no longer pushed under the rug by the print function, and you will get '0.9999999999999' from it.
 
     Also, comparing against a proper 1.0 (which is representable as an exact power of 2), you will get a false result.
-    (i.e. 0.1 * 10 ~= 1.0)
+    (i.e. 0.1 * 10 ~= 0.1)
     This often confuses non-computer scientists (and occasionally even some of those).
     For this, you should always provide an epsilon value, when comparing two numbers. The epsilon value is
     the distance you accept two number to be apart to be still considered equal. Effectively the epsilon says