Created: 2023-01-11 12:12
Status: #concept
Subject: Programming
Tags: C C Data Type
Float
A fractional number that is represented with numbers after the decimal point.
Because the Floating Point can move between the numbers, the alias for Floats are Floating Point Numbers.
C
- In C, there is an extended version of Float that has higher precision: Double numbers, which is allocated 8 Bytes instead of 4.
- By default, all floating point constants are stored as Double unless specified using the
F
suffix after the decimals.
4.21 // automatically stored as Double
6.56F // specified to be stored as Float
References
- C Programming, A Modern Approach, 2nd Edition, Chapter 7.2