02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Intrinsic procedures<br />

Data representation models<br />

Table 11-2 Intrinsic functions and data representation models (Continued)<br />

Intrinsic function Description<br />

“PRECISION(X)” on page 568 Decimal precision in real model for X<br />

“RADIX(X)” on page 572 Base (radix) in integer or real model for X<br />

“RANGE(X)” on page 575 Decimal exponent range in integer or real model for<br />

X<br />

“RRSPACING(X)” on page 580 1/(relative spacing near X)<br />

“SCALE(X, I)” on page 581 X with real model exponent changed by I<br />

“SET_EXPONENT(X, I)” on<br />

page 585<br />

The Bit Model<br />

The bit model interprets a nonnegative scalar data object a of type integer as a sequence of<br />

binary digits (bits), based upon the model:<br />

where n is the number of bits, given by the intrinsic function BIT_SIZE and each b has a bit<br />

value of 0 or 1. The bits are numbered from right to left beginning with 0.<br />

The Integer Number System Model<br />

The integer number system is modeled by:<br />

where<br />

i is the integer value.<br />

474<br />

Set the real model exponent of X to I<br />

“SPACING(X)” on page 590 Absolute spacing near X<br />

“TINY(X)” on page 597 Smallest number in real model for X<br />

a b<br />

k<br />

2 k<br />

n– 1<br />

=<br />

k = 0<br />

Chapter 11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!