comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Why float is called as 'float', not 'real'?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Why float is called as 'float', not 'real'? [message #53165] Sat, 24 March 2007 04:56
James Kuyper is currently offline  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.
Re: Why float is called as 'float', not 'real'? [message #53166 is a reply to message #53165] Sat, 24 March 2007 01:22 Go to previous message
kim20026 is currently offline  kim20026
Messages: 54
Registered: November 2006
Member
Thank you David! And... Congratulations for your child's birthday...

Which wine are you drinking...? I worked in France as a Postdoctoral
researcher for 1 and a half years. I am missing the smell of Bordeaux,
but my favorite were sweet white wines such as Château du rayon,
Sauterne, Monbazillac, etc. I was poor postdoc at that time and just
enjoyed the (relatively) cheap wines with the price of 5 ~ 15 euros,
but still they were Excellent!

Don't drink too much for your health, and have a nice weekend.

Harry
Re: Why float is called as 'float', not 'real'? [message #53168 is a reply to message #53166] Fri, 23 March 2007 22:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
DirtyHarry writes:

> Is there any particular reason to call 'float' instead of 'real'?

Personal computing didn't really get started until the
late 1970s. The IBM PC was released in about 1981. At
that time there were still a lot of "hippies" in graduate
school, and they were always talking about "getting real."
Since computers were not all that accurate at first,
decimal point values seemed to "float around" a lot.
You couldn't put a lot of faith in a number, even if
it was expressed to six or eight decimal places.

So between people getting sick and tired of hearing
about getting "real", and the computer values "floating",
these numbers came to be called "floats" rather than "reals".

Cheers,

David

P.S. My youngest turned 18 today. It is possible I've
had more wine than is probably good for me. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help Large_array
Next Topic: about IDL programming

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:16:06 PDT 2025

Total time taken to generate the page: 0.00436 seconds