Next: M232 Convert Floating-Point
Up: CERNLIB
Previous: M220 Conversion To
Routine ID: M231
| Author(s): F. Carminati | Library: KERNLIB, VAX only
|
Submitter: | Submitted: 13.02.1985
|
Language: Assembler | Revised: 14.08.1985
|
OBSOLETE
Please note that this routine has been obsoleted in CNL 217. Users are
advised not to use it any longer and to replace it in older programs.
No maintenance for it will take place and it will eventually disappear.
Suggested replacement: see CNL 217
The CVTIB package converts floating point numbers between host
machine and IBM formats.
Structure:
SUBROUTINE subprograms
User Entry Names: SIBSX, SXSIB, DIBDX,
DXDIB
Usage:
CALL SIBSX(WORDS,NWORDS)
- WORDS
- ( SINGLE PRECISION) Array dimensioned to at least
NWORDS 32-bit words in the calling program, containing IBM short
floating point numbers to be converted into VAX F floating
point format. The conversion is done in place; on output WORDS
contains the converted numbers. The numbers are converted into standard
VAX F floating format if they are in the appropriate range.
If the number to be converted is bigger than the maximum
VAX F floating (ca.
) it will be set to this value
while if it is smaller than the minimum VAX F floating
(ca.
) it will be set to the latter value.
Zero is correctly converted, however.
- NWORDS
- ( INTEGER) Number of 32-bit words to be converted.
results in do-nothing.
CALL SXSIB(WORDS,NWORDS)
- WORDS
- ( SINGLE PRECISION) Array dimensioned to at least
NWORDS 32-bit words in the calling program, containing
VAX F floating
point numbers to be converted into IBM short floating point format. The
conversion is done in place; on output WORDS contains the converted
numbers. The numbers are converted into standard normalized IBM long
floating format. Where necessary the VAX mantissa is truncated to
normalize the number according to IBM conventions. Zero is correctly
converted.
- NWORDS
- ( INTEGER) Number of 32-bit words to be converted.
results in do-nothing.
CALL DIBDX(WORDS,NWORDS)
- WORDS
- ( DOUBLE PRECISION) Array dimensioned to at least
NWORDS 64-bit words in the calling program, containing IBM
double-precision floating point numbers to be converted into VAX
D floating point format numbers. The conversion is done in
place; on output WORDS contains the converted numbers. The numbers
are converted into standard VAX D floating format if they
are in the appropriate range. If the number to be converted is bigger
than the maximum VAX D floating (ca.
) it
will be set to this value while if it is smaller than the minimum VAX
D floating (ca.
) it will be set to the latter
value. Zero is correctly converted, however.
- NWORDS
- ( INTEGER) Number of 64-bit words to be converted.
results in do-nothing.
CALL DXDIB(WORDS,NWORDS)
- WORDS
- ( DOUBLE PRECISION) Array dimensioned to at least
NWORDS 64-bit words in the calling program and containing VAX
D floating point numbers to be converted into IBM
double-precision floating point format. The conversion is done in place;
on output WORDS contains the converted numbers. The numbers are
converted into standard normalized IBM extended floating format.
Where necessary the VAX mantissa is truncated to normalize the number
according to IBM conventions. Zero is correctly converted, however.
- NWORDS
- ( INTEGER) Number of 64-bit words to be converted.
results in do-nothing.
Notes:
In the routine names above X stands for the host
machine (VAX only) and IB stands for the foreign machine (IBM).
S stands for short (i.e. 32 bits) floating point while the
D stands for long (i.e. 64 bits) floating point.
The sequence of the letters gives the direction of the conversion.
M232
Next: M232 Convert Floating-Point
Up: CERNLIB
Previous: M220 Conversion To
Janne Saarela
Mon Apr 3 15:06:23 METDST 1995