answersLogoWhite

0

If two numbers are involved in a calculation (in this case a multiplication), the result is converted to the more precise data type, to avoid data loss. Even though between long and double data can be lost in either direction, a number with decimals (such as double) is generally considered to be more precise than a number without decimals (such as long). Even though languages such as Java also have a "float" data type, "double" is normally used by default in cases such as these, because of the greater precision. However, you can convert explicitly to float, if you like, using a cast. (Float uses 4 bytes, while double uses 8 bytes.)

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Does long int and long double data types are used in java as in c?

There is does a 'long' datatype in java, but no 'long double'.


What is a long in c programming?

It is used with other data types such as long int or long float (=double). The capacity of the data types got increased with long keyword


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

%ld


Is array a primitive data structure?

No, it's not. But it can be based on primitive data types (int, char, long, double and so on).


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.


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)


What are the different data types suppourted by c.give example?

data types supported by "C" are int , float , char , long , double , uint


Innumerate the different types of data type?

eight primitive data types are: -boolean -char -byte -short -int -long -double -float


What are tose primitive data types?

byte, short, int, long, char, float, double, boolean


What are 8 examples of data types?

byte short long int char float double boolean


What are fundamental data types in java?

Assuming by "fundamental" you mean the primitive data types: boolean, byte, char, short, int, long, float, and double


Give atleast 5 data type in turbo c language?

char, short, long, float, double.