V
V
Vapaamies2015-03-10 12:58:31
C++ / C#
Vapaamies, 2015-03-10 12:58:31

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, DoubleRealand ExtendedReal.
  • Float[n]and SingleFloat, DoubleFloatand ExtendedFloat.

Justify your answer if possible.
At the moment, the language already has types Integer[n]and Word[n], plus their corresponding ByteInt, ShortInt, LongInt, QuadIntand 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

2 answer(s)
A
Armenian Radio, 2015-03-10
@vapaamies

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.

J
jcmvbkbc, 2015-03-10
@jcmvbkbc

At the moment, the language already has the types Integer[n] and Word[n]

Word is also never an unambiguous word, especially on all sorts of funny ABIs like x32 or mips n32: although processor registers are 64-bit, pointers, ints and longs are 32-bit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question