Re: Why float is called as 'float', not 'real'? [message #53165] |
Sat, 24 March 2007 04:56  |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
DirtyHarry wrote:
> Good day everyone. This sounds like a stupid question, but I became
> just curious yesterday, and I looked up several textbooks. However, no
> textbooks on computer language (that I have ) mentioned this. So I am
> asking to you, gurus...
>
> We call real numbers as real in mathematics, but we call them as
> 'floating point' in computer science, especially almost all computer
> languages.
One of the earliest computer languages was Fortran, and it uses
"REAL". I've learned a couple of dozen computer languages in my life
time, but right now I'm having trouble remembering what any of them
called their floating point type except for Fortran, C, and C++.
> Is there any particular reason to call 'float' instead of 'real'?
Real numbers are a mathematical concept. Floating point refers to a
particular limited way of representing real numbers. It's limited
because:
1) It can only directly represent rational numbers
2) The non-zero numbers it can represent have a minimum size.
3) The finite numbers it can represent have a maximum size.
4) The numbers it can represent have a maximum number of significant
bits.
It's named in contrast with "fixed point", where there's a fixed
maximum number of digits before and after the decimal point.There are
also several other ways to approximately represent real numbers,
including storing seperate numerators and denominators.
|
|
|