[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reproducibility; with appropriate limitations...



On 2007-06-06 10:19:44 +0200, Guillaume Melquiond wrote:
I think you are over-designing these functions. For example, you don't
need a 128-bit integer, you may well use two 64-bit integers or four
32-bit integers. I think it is outside the scope of the standard to
explicitly mandate a long-enough _integer_; it should only mandate a
long-enough type (whatever it is).

Yes, it could also be a character string (I'm thinking about Perl,
where a scalar can contain an integer, a string or some other internal
type, but the user doesn't usually see the difference).

You should not try to store an error code by playing with signs either,
as it would probably be a hindrance both for implementers and for users.
The function should rather be defined at a higher level:

    nanDecode(x) = (n,e) with n a sufficiently large type
                          and e a boolean, etc
[...]

Yes, this is better, IMHO.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

754 | revision | FAQ | references | list archive