Floating-Point Formats

The IEEE Standard 754 specifies values and requirements for floating-point representation (such as base 2). The standard outlines requirements for two formats: basic and extended, and for two word-lengths within each format: single and double.

Visual Fortran supports single-precision format (REAL(4)) and double-precision format (REAL(8)) floating-point numbers. Visual Fortran sets the process control word by default to use double-precision run-time intermediate calculations. At some levels of optimization, some single-precision numbers are stored on the floating-point stack (which defaults to double precision) rather than being stored back into memory where they would be truncated to single precision. The compiler option /fltconsistency can control floating-point consistency and request that results be stored in memory rather than on the floating-point stack.