IEEE-754 v1.2
A Conversion Library for the HP 48/49G
$Id: ieee.htm 1.1 2001/11/16 21:19:02 Detlef Exp $
Being a programmer w/ emphasis on data collecion and processing, I need from time to time to take a look at how floating point numberes are represented in a system (ie. their bit pattern). Due the lack of sufficent programs on the net I came up with the IEEE-754 library, it contains conversion routines between real/int and 32/64 bit floating point numbers as described in IEEE-754 1985.
In the archive you will find the following files:
IEEE.HTM this description
IEEE-48.LIB the IEEE-754 library compiled for the HP48G
IEEE-49.LIB the IEEE-754 library compiled for the HP49G
ieee.s the IEEE-754 library source code
mkieee.cmd batch job to build the IEEE-754 library
The souce code can be compiled using the batch job on a PC with the HP tools v3.0 installed.
The library ID is 1001 and the featured commands are:
->DBL ( % | Z --> HXS ) convert a real or zint to a bint in 64 bit IEEE format
DBL-> ( HXS --> % ) convert a bint in 64 bit IEEE format to real
->SGL ( % | Z --> HXS ) convert a real or zint to a bint 32 bit IEEE format
SGL-> ( HXS --> % ) convert a bint in 32 bit IEEE format to real
The commands handle de-/normalized, NAN, infenitive, overflow, underflow conditions. Please see the source code for more information.
A very good page with IEEE-754 references can be found here .
Copyright © 1999-2001 by Detlef Müller, Detlef.M@hamburg.de, Germany