Manual Reference Pages  - radix (3fortran)

NAME

RADIX(3) - [NUMERIC MODEL] 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-lang intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 radix (3fortran) April 28, 2024
Generated by manServer 1.08 from 033605b2-a68f-43a4-acdf-05bf159fd168 using man macros.