answersLogoWhite

0

Some Clarityint data type is that of an integer, positive and negative whole numbers. The range of this data type is limited to -2,147,483,648 -- +2,147,483,647

double data type is: a double precision floating point number, positive and negative, and covers a much larger range.

However there are limitations to the precision of any representation of a floating point number, because all floating point representations are based on negative powers of 2 and the sums of negative powers of 2 i.e. 1/2 is represented as 2-1, 1/4 is represented as 2-2, but 1/3 is the sum of 1/4 + 1/16 + 1/64, etc (the sum of all negative even powers of 2) to the limit of the precision provided by the floating point representation.

Where the double outweighs the int data type is that it can express very large integer numbers without loss of precision.

In terms of processing time to perform operations on each data type, there are no benefits in using the double - it occupies 64 bits (8 bytes) of RAM vs 32 bits (4 bytes) of RAM for the int.

Original answerAs It Is Quite Clear that The range Of Double pricision

Number IS More Than that Of INT....So When We use Double

Over The int ...its Whole Space (that is reserved Somewhere

in the Memory that is Further recalled By Compiler) Just

Gets double of it.........

Benefit is.......Its useful In Program Codes To Avoid BUGs..

Loss Is..........takes DOUBLE Space in memory Allocation as compared to INT..........

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What data type is a percentage?

Percentage is not a data type. A percentage of something would need a floating point data type to store it. One of the following data types. float double long double (in gcc, not sure about other compiler systems)


Is it possible to convert strings in java to double directly?

Not directly. A String is an object, and a double is a primitive data type. To do the conversion you must first convert the String to a Double object (note the capital D in double), then convert that object to a double data type (lowercase d in double). Double is an object, double is a primitive data type. Here's a class that will convert a String to a double:public class StringToDouble{public static void main (String[] arguments) {String s = "100.00";double d = Double.valueOf(s.trim()).doubleValue();System.out.println("double d = " + d);}}


What Bytes occupied by double data type in c?

The number of bytes occupied by a specific data type depends on the implementation. In general, the double data type is eight bytes long, but you can check it using sizeof(double). In 16-bit,32-bit compilers double size is 8 bytes.It looks like float because it stores scientific and financial like big float values.


The data type of an item price?

I am assuming that the question is "What would the best data type to represent a price".Although this is open for debate, in Java I think that the best data type for a price is double and the best data type in C# to be decimal.I hope this answers your question.


When you use decimal which type of data is it?

Decimal numbers are real numbers. In C and C++ we use the float, double and long double data types to represent real numbers.

Related Questions

Why should double data type is preferable over float data type?

by default any float value is double


What is the data type for 0.38?

The data type for 0.38 is double.


What programming data type is 0.00?

The data type 0.00 is of type literal double.


What data type is a percentage?

Percentage is not a data type. A percentage of something would need a floating point data type to store it. One of the following data types. float double long double (in gcc, not sure about other compiler systems)


Where string is primitive data type of string data type?

String is not primitive data. Only char,int,double,and boolean are!


What type of Pokemon dose ice pokemon has an advantage over?

They have an Advantage over Dragon,Grass,Flying and Ground.


What data type is used to store dollar amounts?

double or float


What is control specifier of long double data type in C?

%ld


What is data collected over several time periods in statistics known as?

data collected over several time periods is what type of data?


What are the advantages of plotting data in graph form?

one advantage is that you could then see if there were any rises or falls in the type of data that you are collecting e.g. temperature


Is it possible to convert strings in java to double directly?

Not directly. A String is an object, and a double is a primitive data type. To do the conversion you must first convert the String to a Double object (note the capital D in double), then convert that object to a double data type (lowercase d in double). Double is an object, double is a primitive data type. Here's a class that will convert a String to a double:public class StringToDouble{public static void main (String[] arguments) {String s = "100.00";double d = Double.valueOf(s.trim()).doubleValue();System.out.println("double d = " + d);}}


What Bytes occupied by double data type in c?

The number of bytes occupied by a specific data type depends on the implementation. In general, the double data type is eight bytes long, but you can check it using sizeof(double). In 16-bit,32-bit compilers double size is 8 bytes.It looks like float because it stores scientific and financial like big float values.