REAL Real number
Also called: floating point, float, decimal number
Number with decimals (about 7 significant digits).
What it does
A 32-bit floating-point number, for measurements and calculations with decimals.
When to use it
Temperature, pressure, flow, scaling an analog input, PID control.
| Size | 32 bits |
|---|---|
| Possible values | about ±3.4 × 10³⁸ |
| Starting value | 0.0 |
| Constants (examples) | 0.0, 21.5, -0.25 |
Behaviour in detail
- About 7 significant digits: 0.1 + 0.2 is not exactly 0.3. Avoid comparing two REALs with “equal”.
- A REAL constant is written with a point: 21.5.
European (IEC) and American styles
REAL on both sides.