answersLogoWhite

0


Best Answer

To balance needs of space and accuracy. For a start, having a separate data type for integer is necessary for accuracy - if, for example, you add and subtract lots of numbers with floating-point numbers, you will get accumulated errors. On the other hand, and especially when using sets of many numbers (like arrays), the need to save space becomes important, so you would try to use the number that uses just the amount space you need for a particular purpose, but not more. For example, for a grade that can only have integer values between 0 and 100, a single byte variable is enough, so there is no need to use the larger data types, that use up 2, 4, or even 8 bytes.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why do you think it is important to have a variety of different data types for integer and floating-point numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How are integers different from natural and whole numbers?

An integer is any whole number


Why do you think that rational numbers are important?

The set of whole numbers is not closed under division by a non-zero whole number. Rational numbers provide that closure and so enable the definition of division of one integer by a non-zero integer.


The largest integer that is not the product of two or more different primes?

The largest integer that is not the product of two or more different primes would be the largest prime number. Because there are an infinite number of prime numbers, there is no largest integer that is not the product of two or more different primes.


How Ares integer different from whole number?

Whole numbers are integers. Integers are whole numbers.


Is 63.46 an integer?

Integer are whole numbers. As 63.46 is not a whole number, it is not an integer.


Is negative sixteen an integer?

Yes. "Integer" includes positive numbers, negative numbers, and zero.


Meaning of non-integer rational numbers?

non integer rational numbers means the numbers in p/q form and this value is not a perfect integer. ex: 22/7


When are whole numbers integers?

Always. "Whole number" and "integer" are two different names for the same thing.


What is an integer of 71 but the difference of 3?

71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.


What is the difference between integer numbers and float numbers?

Integer numbers : ...-5,-4,-3,-2,-1,0,1,2,3,4,5... Float numbers 1.25, 1.26 etc They are float numbers because its value can be altered after the point, which is based on an integer number.


What is the Difference between an integer and a real number?

Integer numbers are a subset of real numbers. Real numbers may contain fractions.


Is a negative integer bigger then a positive integer?

no, all negative numbers are smaller than positive numbers