keyword: float

This keyword defines a 32-bit floating-point number, which is a number with a decimal point, as opposed to integers which only store whole numbers.

The values that can be stored in floating point numbers is complicated, but generally, a float can store up to 9 significant figures.

See Performance Considerations for things you should watch out for when writing software.

Usage:

float x = 12.345;
float y = -0.123456789;

Related Posts