next up previous index
Next: M232 Convert Floating-Point Up: CERNLIB Previous: M220 Conversion To

M231 Convert Floating-Point Numbers Between Host Machine and IBM Formats

Routine ID: M231
Author(s): F. CarminatiLibrary: KERNLIB, VAX only
Submitter: Submitted: 13.02.1985
Language: AssemblerRevised: 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. 1038 ) it will be set to this value while if it is smaller than the minimum VAX F floating (ca. 10-38 ) it will be set to the latter value. Zero is correctly converted, however.
NWORDS
( INTEGER) Number of 32-bit words to be converted. NWORDS ≤0 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. NWORDS ≤0 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. 1038 ) it will be set to this value while if it is smaller than the minimum VAX D floating (ca. 10-38 ) it will be set to the latter value. Zero is correctly converted, however.
NWORDS
( INTEGER) Number of 64-bit words to be converted. NWORDS ≤0 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. NWORDS ≤0 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 up previous index
Next: M232 Convert Floating-Point Up: CERNLIB Previous: M220 Conversion To


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995