Answer the question
In order to leave comments, you need to log in
Floating point type - Real or Float?
The question arose, what would be the correct name for the family of floating-point types, using the word Real
(real) or Float
(floating)? The word float is jargon, isn't it, because the machine representation is called floating point ?
Historically, in Pascal floating-point numbers are denoted by the word real , and in C - float . Is it different terminology, preferences of developers (taste), difference in thinking, features of the English language on different sides of the Atlantic? I do not know the answer.
From your point of view, how would it be more correct to name the family of types in the language:
Real[n]
and SingleReal
, DoubleReal
and ExtendedReal
.Float[n]
and SingleFloat
, DoubleFloat
and ExtendedFloat
.Integer[n]
and Word[n]
, plus their corresponding ByteInt, ShortInt, LongInt, QuadInt
and Byte, ShortWord, LongWord, QuadWord
. There were no problems with their naming: the chosen terms are unambiguous both for the mathematical nature of integers and for their machine representation.
Answer the question
In order to leave comments, you need to log in
The problem is that a computer (any) is not able to store and process a real number - it can only store a rational number, floating or fixed point.
Therefore, the use of real would be a natural lie - it is correct to talk about float and fixed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question