Skip to content
Snippets Groups Projects
Commit 8ad7a88c authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-07-29 10:01:05 by simonmar]

Document changes to shift operations.
parent fad03b44
No related merge requests found
......@@ -82,6 +82,14 @@ such as <tt/Int/ (see the section of the Haskell report dealing
with arithmetic sequences) also hold for the <tt/Enum/ instances
over the various <tt/Int/ types defined here.
<item>
Right and left shifts by amounts greater than or equal to the width of
the type result in either zero or -1, depending on the sign of the
value being shifted. This is contrary to the behaviour in C, which is
undefined; a common interpretation is to truncate the shift count to
the width of the type, for example <tt>1 &lt;&lt; 32 == 1</tt> in some
C implementations.
<item>
Hugs does not provide <tt/Int64/ at the moment.
......
......@@ -102,6 +102,13 @@ such as <tt/Int/ (see the section of the Haskell report dealing
with arithmetic sequences) also hold for the <tt/Enum/ instances
over the various <tt/Word/ types defined here.
<item>
Right and left shifts by amounts greater than or equal to the width of
the type result in a zero result. This is contrary to the behaviour
in C, which is undefined; a common interpretation is to truncate
the shift count to the width of the type, for example <tt>1 &lt;&lt;
32 == 1</tt> in some C implementations.
</itemize>
<bf/Implementation notes:/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment