Q4. What are the advantages and disadvantages of floating-point numbers over integers?
- The values in between two integers can easily be represented, for example, all possible values between 1 and 2 such as 1.2, 1.313 etc. be represented.
- Much larger range of values can be represented using floating-point numbers.
Floating-point operations are slower than integer operations.