[Cryptography] floating point

Ray Dillinger bear at sonic.net
Wed Dec 24 15:30:23 EST 2014



All this discussion makes me wonder how many who consider
themselves "experts" are surprised and baffled by languages
wherein numerics DON'T work in any way resembling IEEE
floats.

One implementation of common lisp has bignum integers by
request, and otherwise their numbers have numerator and
denominator both of up to 64 bits, plus binary and decimal
exponents, both of up to 32 bits.  Oh, and it gets yet
weirder because if the denominator is negative, that signifies
that the number is inexact (ie, rounding errors or inexact
functions such as logarithm have been used in obtaining it)
and that instead of the rational interpretation, the value
of the other 63 bits of the denominator should be read as
extending the numerator.

It's all very clever, high precision, and gives exact results
for a lot more of the cases where people expect them, but the
prospect of doing numerical analysis and determining error
bounds in that environment gives me hives.

The PRNG using floating-point operations recently discussed
here absolutely depends on particulars of IEEE binary
representation; if a straightforward translation to common
lisp were run on the above numerics, or a straightforward
translation to Cobol were run on the base-10 numerics
specified for that language, it would produce an entirely
different sequence with different security properties.

			Bear



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://www.metzdowd.com/pipermail/cryptography/attachments/20141224/e4a419a1/attachment.sig>


More information about the cryptography mailing list