I would like to know exactly how fortran 95 (f95) handles converting a double pr
ID: 3638362 • Letter: I
Question
I would like to know exactly how fortran 95 (f95) handles converting a double precision (DP) data type to a single precision (SP) data type.Does it take the DP and chop, or round the mantissa and store it? Also how does it handle the conversion of the exponent.
The basis of this question is that I want to understand the results of storing a DP into a SP so that I can always predict the outcome (ie. when will I get an actual number, + or - infinity, or Nan).
Lifesave to anyone who rigorously explains this.
Thank you very much!!!
Explanation / Answer
precision to single precision on interpolation. What = G/BETA/ENERGY Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/CONDUCT_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/CVVOL Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/DENSITY_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/DRHODP_T_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/ENTHSTAT_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/ENTROPY_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/MACH_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/PRES Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/PTOT Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/SPHEATP_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/SSTRNR_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/TEMP_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/TTOT_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/VEL_FL1 Where = ZN1/VX When = 200 WARNING: The following data is being reduced from double precision to single precision on interpolation. What = G/VISCDYN_FL1 Where = ZN1/VX