Yes, I think it would be good to have Word32. In Twelf, we use Word6x to simulate Word32. It so happens that on our current constraint domain specification, proper wraparound is not important, but that may change.
- Frank
LargeWord's <, >, <=, and >= operators seem to be doing signed comparisons, contrary to their intended behavior (and the behavior of LargeWord.compare). A transcript follows -- note the last line:
Thanks for reporting this. Actually LargeWord is a double-precision version of Word (i.e. 60 bits on the Sparc and 62 bits on everything else) and there was a silly mistake in all the relational operators which meant that the comparison on the high order word was reversed. I've fixed it in my copy of the source and it will get included in the next release. In the meantime if anyone needs the fix I can post the diffs.
A related question concerns Word32. Poly/ML does not currently have a Word32 structure although many other implementations do. The LargeWord structure can normally be used except that this does not produce exactly the same results if arithmetic wraps round. It probably wouldn't be a lot of work to provide it. Has anyone found a pressing need for it?
David.
polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml