next up previous contents
Next: Examples and Exercises Up: Survey of the New Previous: Parameterized Data Types

Numerical Inquiry and Manipulation Functions

 

Fortran 90 introduces several intrinsic functions to inquire about machine dependent characteristics of an integer or real. For example, the inquiry function, huge, can be used to find the largest machine representable number for an integer or real value. The integer model used by these inquiry functions isgif

displaymath739

 where

i is the integer value

s is the sign (+1 or -1)

r is the radix (r > 1)

q is the number of digits (q > 0)

tex2html_wrap_inline755 is the kth digit, tex2html_wrap_inline759 .

The floating-point model used by the inquiry functions is

displaymath740

 where

x is the real value

s is the sign (+1 or -1)

b is the base (b > 1)

e is the exponent

p is the number of mantissa digits (p > 1)

tex2html_wrap_inline775 is the kth digit, tex2html_wrap_inline779 , tex2html_wrap_inline781 .

Table 1 lists intrinsic functions that inquire about the numerical environment. Table 2 lists intrinsic functions that manipulate the numerical characteristics of variables in the real model. An important feature of all of these intrinsic functions is that they are generic and may be used to obtain information about any kind of integer or real supported by the Fortran 90 implementation.

   table79
Table 1: Numeric Inquiry Functions

   table98
Table 2: Numeric Manipulation Functions



next up previous contents
Next: Examples and Exercises Up: Survey of the New Previous: Parameterized Data Types