fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

CORRECT PRECISION OF REAL NUMBERS

Syntax:

[DO NOT] CORRECT PRECISION OF REAL [LITERAL] NUMBERS

Function:

fpt examines the context in which every literal real number is used. If the number is assigned to a variable of higher precision, or the number is used in an arithmetic expression with objects of higher precision, the precision of the number is changed to match the context.

fpt reports the number of literal real numbers in the code, the proprtion with kind tags, the proportion promoted to a higher precision and the proportion promoted where the value of the number is changed by the promotion.

The effects of changing precision may be investigated by the command INSERT MONITOR OF CHANGED REAL NUMBERS.

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code No

Default

Examples

fpt is run interactively. The value of pi is written without a kind tag or exponent character in the original code and is promoted.

FPT> correct precision of real numbers ------------------------------------------------------------------------------ NOTE Number 3743 Severity 0 (Worst 1) Count 3 Line 2 File: e:\winfpt\fpt\fpttest\t.f90 1 PI=3.14159265358D0 ^ Real literal precision increased with a small change in value ------------------------------------------------------------------------------ Promotion of Literal REAL Numbers ================================= Count Percent REAL literal numbers: 2 With KIND tags: 0 0.00% Promoted to higher precision: 2 100.00% Promoted with change in value: 1 50.00% Not promoted: 0 0.00% FPT>

Copyright ©1995 to 2018 Software Validation Ltd. All rights reserved.