Advantages and Disadvantages of floating-point numbers over integers.

Q4. What are the advantages and disadvantages of floating-point numbers over integers?

Ans. Advantages:

  1. 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.
  2. Much larger range of values can be represented using floating-point numbers.


Floating-point operations are slower than integer operations.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: