Code Comments
Programming Forum and web based access to our favorite programming groups."Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message news:8ue9j05arsd8h5jhknobv9a46pur41tfhc@ 4ax.com... > > It is stored in memory as '0345', if decimal, or 0159, if binary/hex. > If you multiplied it by 1.23, the result in decimal would look like > '42435'. The decimal point is used to align receiving fields. Last time I looked, "is", "is treated as" and "is stored in memory as" aren't synonymous. I believe I've pointed that out before. What you wrote was "All fixed-point numbers are integers." If what you *really* meant was "All implementations of my acquaintance store fixed-point numbers in memory as integers", then I'd suggest that that's what you should have written. I wouldn't have a quibble with that. Even the shorthand "Most implementations store fixed-point numbers as integers" doesn't rankle. The standard doesn't require this, however. I know environments in which integers, fixed-point and floating-point data items are "stored in memory" identically; the only differentiation among them is how they are handled and treated. In that environment, in fact, there is no requirement that integer data actually *be* in "canonic integer form"; a normalized floating-point representation of the value serves equally well and is just as exact a representation. Thus, in that environment, a fixed-point numeric value may be stored, *not* as an integer defined for that implementation, but as a *floating-point* item that happens to have an exact value. So I would take exception to the elision of "of my acquaintance" because it would demonstrably turn the statement from "true" to "false". How something is *handled* and how something are *stored* may be entirely orthogonal to what something *is*. -Chuck Stevens
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.