answersLogoWhite

0


Best Answer

Actually float and double are both numeric data types that are used to store large numbers. They can have a lot of digits after the decimal point in the number. The actual difference between them is in size. According to the Java Language Specification, a float is a 32-bit value, while a double is a 64-bit value. Otherwise they work in the same way with respect to one another.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

Because they represent two different types of values. floats are used for large numbers but doubles are used for extremely large numbers.

a float variable range is somewhere around 2100 or so whereas the range in a double variable is somewhere around 21000 or even more

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Integer and Floating-point data are variables to be used in a program. Variables are space in a memory where we can store data. Integer (represented by int) and Floating-point data (by float) both represent numbers. They differ only in the type and length of number that they represent.

Integers can be represented in long and short. It differs in the length of the data it stores. Here, int will stores integer number (number that does not have decimals on it) in the range of -2,147,483,648 to 2,147,483,648 in long signed int (by default) or 0 to 4,294,967,295 in long unsigned int. In short signed int from -32,768 to 32,767 and in short unsigned int 0 to 65,535.

While float will stores decimal numbers with the range quite similar to long int.

Hope this answers your question, sorry for mispelling and grammatical error. BTW, i just started learning C++ yesterday, i bought visual quickstart guide in C++ programming, credits to the book writer Larry ullman and Andreas signer

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

integer data is stored as binary integers which can be converted to decimal, and used in addition/subtraction/multiplication/division with no loss of accuracy.

floating point data is stored as an approximation and suffers from some inaccuracy.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between integer and floating point data?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are advantages and disadvantages of Integer programming?

The advantages of integer arithmetic over floating point arithmetic is the absence of rounding errors. Rounding errors are an intrinsic aspect of floating point arithmetic, with the result that two or more floating point values cannot be compared for equality or inequality (or with other relational operators), as the exact same original value may be presented slightly differently by two or more floating point variables. Integer arithmetic does not show this symptom, and allows for simple and reliable comparison of numbers. However, the disadvantage of integer arithmetic is the limited value range. While scaled arithmetic (also known as fixed point arithmetic) allows for integer-based computation with a finite number of decimals, the total value range of a floating point variable is much larger. For example, a signed 32-bit integer variable can take values in the range -231..+231-1 (-2147483648..+2147483647), an IEEE 754 single precision floating point variable covers a value range of +/- 3.4028234 * 1038 in the same 32 bits.


What is a floating number?

A floating point number is one that contains an integer as well as a fractional part, for example 101.3625. These are often represented by their scientific notations as well, such as 1.013625E2


Does a number stored as an integer take up less space in the computer's memory than a floating points number?

It depends on the particular implementation's representation of integer and floating point number. The IEEE 754-2008 standard provides four basic resolutions, 16 bits (not common), 32 bit, 64 bits, and 128 bits (also not common). At the same time, integers can be 8 bits, 16 bits, 32 bits, 64 bits (in 64 bit platforms and some libraries on 32 bit platforms) and 128 bits (not common). In general, if you want to keep resolution down to the units digit, you can store a larger number in an integer than you can in a floating point, due to overhead in the exponent, but, at the same time, due to the scalability of floating point numbers, you can store larger numbers in floating point numbers if you are willing to lose resolution on the low-order end.


What is a giga flop?

A giga-flop stands for a billion FLOATING POINT instructions per second. It signifies nothing about the number of Integer or memory load/store/jump operations. It is primarily used in the Scientific Computing field, which mostly run large-scale simulations, which are (almost) exclusively floating point calculations.


Difference between single-point cutting tool use in lathe and shaping machine?

explain the difference between single point & multi point cutting tool

Related questions

What is difference between an integer variable and floting point variable?

The set of the possible values.


What is the largest integer and the largest floating-point number?

In real-world math, there is no "largest" integer or floating point number. This is covered by the concepts known as "infinity" and "irrationality." Depending on the processor and/or application, a number with significant digits into the thousands can be operated upon.


Is 9.6 and integer?

No, 9.6 is a floating-point number. Integers are whole numbers without fractional parts.


What are advantages and disadvantages of Integer programming?

The advantages of integer arithmetic over floating point arithmetic is the absence of rounding errors. Rounding errors are an intrinsic aspect of floating point arithmetic, with the result that two or more floating point values cannot be compared for equality or inequality (or with other relational operators), as the exact same original value may be presented slightly differently by two or more floating point variables. Integer arithmetic does not show this symptom, and allows for simple and reliable comparison of numbers. However, the disadvantage of integer arithmetic is the limited value range. While scaled arithmetic (also known as fixed point arithmetic) allows for integer-based computation with a finite number of decimals, the total value range of a floating point variable is much larger. For example, a signed 32-bit integer variable can take values in the range -231..+231-1 (-2147483648..+2147483647), an IEEE 754 single precision floating point variable covers a value range of +/- 3.4028234 * 1038 in the same 32 bits.


What is a floating number?

A floating point number is one that contains an integer as well as a fractional part, for example 101.3625. These are often represented by their scientific notations as well, such as 1.013625E2


What is the difference between floating point and fixed point processor?

in fixed point processor there is no separate mantissa and exponent part usually the nuumber can be represented from -1.000000to 1.0000000 wheras in floating point processor mantissa and exponent are separated so you can increase the range of values by compromising accuracy


How can the decimal real number 175.23 be represented as a 6 digit integer in floating point notation?

175.23*10^-2


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.


How can the decimal real number 1385.58 be represented as a 6-digit integer in floating point notation?

138558 x 10-2


What are the difference between freezing point and boiling point?

what is the difference between freezing and boiling point


What is the benefit of using biased representation for the exponent portion of a floatingpoint number?

It allows you to compare two floating point values using integer hardware.


What is difference between melting point and drop melting point?

No basic Difference between melting point and Drop point.