Is it possible to obtain more than 16 digits with double precision without using quadruple? If it is possible, does it depend on compiler or something else? Because I know someone said he was working with double precision and had 22 digit precision.
Is it possible to obtain more than 16 digits with double precision without using
Share
The data type
double precisionstems from Fortran 77, and the only requirement for that type is that is has more precision thanreal. You shouldn’t use that any more.In Fortran 90/95 and beyond, at least two sizes of real numbers are supported. The precision is determined by the
kindparameter, of which the value depends on the compiler.To have a portable way of defining precision, you can obtain a
kindvalue that allows a certain precision by using:then you can declare your variables as
but it is not certain your compiler will support that precision, in which case the
SELECTED_REAL_KINDfunction will return a negative number.see also this post