answersLogoWhite

0

To declare a double precision variable in Fortran, you can use the "real(kind8)" declaration. This specifies that the variable should be of double precision, which is typically 8 bytes in size.

User Avatar

AnswerBot

4mo ago

What else can I help you with?

Related Questions

How do you write a floating point variable in c?

You declare a floating point variable using the float or double keyword for a single- or double-precision floating point variable, respectively:float a;double b;You reference a floating-point variable just like any other scalar variable by using the variable's name in a compatible expression, e.g.a += 2;b /= a;Floating point literals use a period for the decimal point, no "thousands separator," and use the letter 'e' to denote a power of ten, e.g.a = 0.123;b = 123e-3;Both a and b now have the same value, 123 times 10 to the power of -3 (which equals 0.123).


Declare a numerical variable precise and initialize it to the value 1.09388641?

double precise = 1.09388641;


What code would you used to declare a variable that can store the current in a circuit?

double variable_list;


What code would you use to declare a variable that can store the current in a circuit?

double variable_list;


Difference between single precision and double precision?

Single Precision, called "float" in the 'C' language family, and "real" or "real*4" in Fortan. This is a binary format that occupies 32 bits (4 bytes) and its significand has a precision of 24 bits (about 7 decimal digits). Double Precision called "double" in the C language family, and "double precision" or "real*8" in Fortran. This is a binary format that occupies 64 bits (8 bytes) and its significand has a precision of 53 bits (about 16 decimal digits). Regards, Prabhat Mishra


What data type will you use to declare a variable to store population on earth?

Since the population of the Earth is around 7 billion (short scale), I would use either a long long integer that was 64 bits in length (if available) that would give me 18 digits of precision, or a double precision floating type that would give me 15 digits of precision.


Which keyword is used to declare constants and variable?

Constants are defines using the final keyword.Variables are defined using the one of the keywords:charbooleanintdoublelongintStringTo use a constant you would have to put in something likedouble final pi = 3.14;


Can a double value be assigned to float variable?

THIS IS FOR JAVA i don't know about anything about other languages yes it can be assignedthe syntax is:int (number) = (float) numberFOR EXAMPLE:int = a;a = (float ) 5.5;if the (float) is not there then in Java it gives an error saying precision loss of data type


Are The number of significant digits in a double variable is up to 15?

The maximum number of significant digits in value belonging to the double type is 15. The maximum number of significant digits is called the precision.


How can you increase the precision of the double in c?

no you cannot increase the precision of double itself in C


How can i write a code with a derived datatype in fortran?

The following is for F90 and later: Lets say for example we wish to define a datatype called 'fluid' which will be the parameters of a fluid (I chose this because its common in CFD). The fluid carries various properties, such as density, temperature, viscosity and so on. We begin by defining the derived type. !*********Code begins here (this may be done in a module) type fluid character(len = 32) :: name double precision :: density double precision :: viscosity double precision :: temperature end type !********* End of definition Now in order to use this derived data type in a program we first declare it. !*********Declaration goes in the top of the program/subroutine you will be using it type(fluid) :: water !*********end declaration Now that we have a variable called 'water' which is of type 'fluid', we can address its parameters !*********Storing values into parameters water%name = "cold water" water%density = 1.0d0 water%temperature = 300.0d0 !*********end of storage * Note that derived data types can also carry dimensions if you wish. This would be simply done by either assigning a dimension to the type, or to the parameters.


What are real constants in java?

"real" numbers, in any programming language, are actually approximations of what is called a "real number" in math. Basically, a number that can handle decimals - but unlike the actual real numbers, of limited precision. In Java, the "real" data types are float, and double. double has greater precision. A "constant" in Java is similar to a variable, but its value can't be changed after it has been assigned a value.