[UP]


Manual Reference Pages  - digits (3)

NAME

digits(3f) - [FORTRAN:INTRINSIC] Significant digits function

CONTENTS

Syntax
Description
Arguments
Return Value
Example
Standard
Class

SYNTAX

result = digits(x)

DESCRIPTION

digits(x) returns the number of significant digits of the internal model representation of X. For example, on a system using a 32-bit floating point representation, a default real number would likely return 24.

ARGUMENTS

X - The type may be INTEGER or REAL.

RETURN VALUE

The return value is of type INTEGER.

EXAMPLE

Sample program:

    program demo_digits
        integer :: i = 12345
        real :: x = 3.143
        real(8) :: y = 2.33
        print *, digits(i)
        print *, digits(x)
        print *, digits(y)
    end program demo_digits

STANDARD

[[Fortran 95]] and later

CLASS

[[Inquiry function]]


digits (3) March 18, 2019
Generated by manServer 1.08 from 62233b79-a011-4d22-bf1d-84f308b92ef0 using man macros.