06.03.2014 Views

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

Intel Fortran Language Reference - NCI National Facility

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3 <strong>Intel</strong> <strong>Fortran</strong> <strong>Language</strong> <strong>Reference</strong><br />

The exponent letter Q denotes a quad-precision real (REAL(16)) constant.<br />

A minus sign must appear before a negative real constant; a plus sign is optional before a positive<br />

constant. Similarly, a minus sign must appear between the exponent letter (E, D, or Q) and a<br />

negative exponent, whereas a plus sign is optional between the exponent letter and a positive<br />

exponent.<br />

If the real constant includes an exponent letter, the exponent field cannot be omitted, but it can be<br />

zero.<br />

To specify a real constant using both an exponent letter and a kind parameter, the exponent letter<br />

must be E, and the kind parameter must follow the exponent part.<br />

REAL(4) Constants<br />

A single-precision REAL constant occupies four bytes of memory. The number of digits is<br />

unlimited, but typically only the leftmost seven digits are significant.<br />

IEEE* S_floating format is used.<br />

Examples<br />

The following examples show valid and invalid REAL(4) constants:<br />

Valid<br />

3.14159<br />

3.14159_4<br />

621712._4<br />

–.00127<br />

+5.0E3<br />

2E–3_4<br />

Invalid<br />

Explanation<br />

1,234,567. Commas not allowed.<br />

325E–47 Too small for REAL; this is a valid DOUBLE PRECISION constant.<br />

–47.E47<br />

Too large for REAL; this is a valid DOUBLE PRECISION constant.<br />

625._6<br />

6 is not a valid kind for reals.<br />

100 Decimal point missing; this is a valid integer constant.<br />

$25.00 Special character not allowed.<br />

See Also<br />

• “General Rules for Real Constants”<br />

3-8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!