Fix description of rounding to nearest in fixed point to take into
[pintos-anon] / doc / 44bsd.texi
index 3f1791880e82efa6b27677ca2e882e4bf3725058..fc619c1595cd367690815bda13e2070b6a934a1f 100644 (file)
@@ -318,11 +318,12 @@ q}:
 @item Convert @code{n} to fixed point:
 @tab @code{n * f}
 
-@item Convert @code{x} to integer (rounding down):
+@item Convert @code{x} to integer (rounding toward zero):
 @tab @code{x / f}
 
 @item Convert @code{x} to integer (rounding to nearest):
-@tab @code{(x + f / 2) / f}
+@tab @code{(x + f / 2) / f} if @code{x >= 0}, @*
+@code{(x - f / 2) / f} if @code{x <= 0}.
 
 @item Add @code{x} and @code{y}:
 @tab @code{x + y}