CS 3304: Comparative Languages
Data Types
[
Course Documents
] : [
Data Types
]
Previous
Contents
Next
Keyword Index
Floating Point Types
Model real numbers, but only as approximations
In any particular numeric domain, the
model numbers
are the set of exactly representable numbers
Languages for scientific use support at least two floating-point types; sometimes more
Usually exactly like the hardware, but not always; some languages allow accuracy specs in code (e.g., Ada):
type Speed is digits 7 range 0.0..1000.0; type Voltage is delta 0.1 range -12.0..24.0;
See book for representation (p. 199)