32-bit real number: float, single

32-bit real number and his value range: from -3.4 × 10 on 38 to +3.4 × 10 on 38 and it has 7 digit precision. this means that it is true that we can into it save big numbers but we must calculate that over number 7 will be rounding. for example, it can be used for storing large numbers, where are not so important the smaller parts, or in the case of small integers with a fraction. if it is used to store integers the biggest integer what can store without rounding is 2 on 24. 32-bit real number is stored the following way: 1bit sign, 8bit exponent and 23bit mantissa.

float

Description

 float
Used keywords: float
Note: In C like languages the data type size may be different depending on compiler and architecture, we show only one standard look.
Compatible programing languages:
C | Visual C++ .NET | C++ | C# | Java

Examples

Example

32-bit real number the possible of use:
float x = 3.14159265359;  // x = 3.14159274
float y = 123456789;      // y = 123456792.0
y =(float)(x * y);       // z = 387850976.0

single

Description

 single
Used keywords: single
Compatible programing languages:
Basic | Visual Basic .NET | FreeBASIC | Free Pascal | Object Pascal | Pascal

Examples

Basic

32-bit real number the possible of use:
Dim x As single= 3.14159265359  ' x = 3.14159274
Dim y As single= 123456789      ' y = 123456792.0
y =CSng((x * y))       ' z = 387850976.0

You can find it in the following collections: real numbers | numbers | data types
Languages: en hu cz sk