[m-rev.] for discussion: undefined behaviours in int.m
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Oct 21 11:27:49 AEDT 2016
On Fri, 21 Oct 2016 02:56:26 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> Is there any reason not to require 2's complement integer representation for
> Mercury ints?
No.
While some early computers used other representations for integers
(sign+magnitude, or one's complement), those have all died out.
> (On a related issue: does anyone have an objection to use requiring that
> Mercury floats be IEEE 754 single or double precision values?)
I have no objection to requiring IEEE 754. There is still an instruction set
in use today that uses pre-754 float representations, IBM's old format
from the System 360, but it doesn't matter to us, since I believe the IBM
mainframes that implement those old non-754 formats implement
the 754 formats as well.
I do object to requiring Mercury floats to be either singles or doubles,
because there are actually good reasons for number-crunching programs
to use quad precision. We don't support this currently, but there is no
reason why should close off the possibility for the future.
Zoltan.
More information about the reviews
mailing list