ArithmeticValue.st
changeset 20338 d6c7cb1e32df
parent 20337 8ea0078f0179
child 20346 fd33c56536df
child 20353 500460b04523
--- a/ArithmeticValue.st	Fri Sep 02 16:42:45 2016 +0200
+++ b/ArithmeticValue.st	Fri Sep 02 16:43:58 2016 +0200
@@ -281,7 +281,8 @@
 // something
     "return the integer quotient of dividing the receiver by aNumber with
      truncation towards negative infinity.
-     Please be aware of the effect of truncation with negative numbers,
+     
+     Please be aware of the effect of truncation on negative receivers,
      and understand the difference between '//' vs. 'quo:'
      and the corresponding '\\' vs. 'rem:'"
 
@@ -298,7 +299,10 @@
      The remainder has the same sign as the argument, something.
      The following is always true:
         (receiver // something) * something + (receiver \\ something) = receiver
-    "
+
+     Please be aware of the effect of truncation on negative receivers,
+     and understand the difference between '//' vs. 'quo:'
+     and the corresponding '\\' vs. 'rem:'."
 
     ^ self - ((self // something) * something)
 
@@ -348,6 +352,11 @@
 quo:something
     "Return the integer quotient of dividing the receiver by the argument
      with truncation towards zero.
+
+     Please be aware of the effect of truncation on negative receivers,
+     and understand the difference between '//' vs. 'quo:'
+     and the corresponding '\\' vs. 'rem:'.
+
      The following is always true:
         (receiver quo: aNumber) * aNumber + (receiver rem: aNumber) = receiver
      For positive results, this is the same as #//,
@@ -369,8 +378,11 @@
      with truncation towards zero.
      The remainder has the same sign as the receiver.
      The following is always true:
-	(receiver quo: something) * something + (receiver rem: something) = receiver
-    "
+        (receiver quo: something) * something + (receiver rem: something) = receiver
+
+     Please be aware of the effect of truncation on negative receivers,
+     and understand the difference between '//' vs. 'quo:'
+     and the corresponding '\\' vs. 'rem:'."
 
     ^ self - ((self quo:something) * something)
 !