|
Authored by: jesse on Tuesday, May 14 2013 @ 12:38 PM EDT |
No, it isn't wrong.
It all depends on who/what is interpreting the value.
If you are comparing two floating point numbers in a sequence like "a =
2.5; b=4.5; if (a == b)"... guess what the final code uses...
Integer data movement
Integer comparison.
If you are examining a data dump (archaic, I know), guess what you see - either
hex or octal representations of a binary number. (And yes, I have dumped files,
usually to identify what is in the file, other times to find strings of
ascii...)
If you generate a disassembly of the executable, guess what you see... Only hex
or octal values of the number.
The numbers in a program have no meaning at all to the computer.
Only the reader.
Now that said, there have been efforts to also embed data typing in executables.
It doesn't work very well because there is always a limit on the number of types
that these systems can store. Usually, they usually only preserve types as
defined by the hardware. But just because the hardware now has information that
a specific binary sequence is a floating point number, that doesn't mean it has
information to designate that floating point number as an "age".[ Reply to This | Parent | # ]
|
|
|
|
|