lua-users home
lua-l archive

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



On 28-Sep-06, at 4:27 PM, Glenn Maynard wrote:

I was speaking the other way around: floats represent integers, and
integers represent bit strings; if that means integers are a fundamental
type, bit strings are too.  They both seem equally contrived.

Not at all. The float 1.0 doesn't represent the integer 1. It is an integer. (That is, it is a precise description of the integer 1). Arithmetic with such integers continues to be platonically integral until you reach the representational limit of the floating point implementation, say 2^53.

I suspect that you think of floating point numbers as imprecise, but there is another view, supported by IEEE-759, which is that every floating point number is a precise representation of some quantity, but the operations on the floating point numbers are imprecise (although highly deterministic: there is only one correct value for most operations, because the answer must be the closest representable value; if two values satisfy this constraint, then the rounding mode is used to select between them.)

Anyway, I have this growing suspicion that we are simply have different views on this issue and continuing to discuss it, amusing though it might be for by-standers, will resolve nothing.