Manual Reference Pages  - radix (3fortran)

NAME

RADIX(3) - [MODEL:NUMERIC] Base of a numeric model

SYNOPSIS

result = radix(x)

        integer function radix(x)

TYPE(kind=**),intent(in) :: x(..)

CHARACTERISTICS

o X may be scalar or an array of any real or integer type.
o the result is a default integer scalar.

DESCRIPTION

RADIX(3) returns the base of the internal model representing the numeric entity X.

In a positional numeral system, the radix or base is the number of unique digits, including the digit zero, used to represent numbers.

This function helps to represent the internal computing model generically, but will be 2 (representing a binary machine) for any common platform for all the numeric types.

OPTIONS

o X : used to identify the type of number to query.

RESULT

The returned value indicates what base is internally used to represent the type of numeric value X represents.

EXAMPLES

Sample program:

    program demo_radix
    implicit none
       print *, "The radix for the default integer kind is", radix(0)
       print *, "The radix for the default real kind is", radix(0.0)
       print *, "The radix for the doubleprecision real kind is", radix(0.0d0)
    end program demo_radix

Results:

     >  The radix for the default integer kind is           2
     >  The radix for the default real kind is           2
     >  The radix for the doubleprecision real kind is           2

STANDARD

Fortran 95

SEE ALSO

DIGITS(3), EPSILON(3), EXPONENT(3), FRACTION(3), HUGE(3), MAXEXPONENT(3), MINEXPONENT(3), NEAREST(3), PRECISION(3), RANGE(3), RRSPACING(3), SCALE(3), SET_EXPONENT(3), SPACING(3), TINY(3)

Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 radix (3fortran) November 02, 2024
Generated by manServer 1.08 from 1548982d-0d94-4bc5-9c48-c131ef0819e8 using man macros.