Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-ses!hpcc01!hpsmdca!phil From: phil@hpsmdca.HP.COM (Philip Walden) Newsgroups: comp.sys.hp Subject: Re: Converting Reals Message-ID: <9660003@hpsmdca.HP.COM> Date: 7 Jul 89 16:09:21 GMT References: <5292@charon.unm.edu> Organization: HP Surface Mount Development Center Lines: 32 > / hpsmdca:comp.sys.hp / steve@wayback.unm.edu (Steve Jorgensen-S) / 12:39 pm Jul 6, 1989 / > > I am working on a program, where I read data files created on a HP 1000 > computer, and I am trying to use the data on a HP 9000/300. In the data > files, I have some floating point numbers to read, and, since they were written > out in HP 1000 format, the HP 9000 does not interpret them correctly. So, > May question is: How do you convert a 4 byte HP 1000 floating point number > to a HP 9000 floating point number? Any help will be appreciated! Thanks! > I's been a while, but I recall that the HP1000 folks had a library routine to convert HP1000 FPP to IEEE, which is used by HP9000's. This routine was originally intended for the HP9000/500s but works for the 300/800 series. Digging out my RTE Relocatable Library Reference Manual (cough, cough, whew .. the dust!), these routines are called DFCHI, FCHI, DFCIH and FCIH. status = DFCHI(hpfp, i3efp) - HP1000 dble prec to IEEE dble prec status = FCHI(hpfp, i3efp) - HP1000 sngl prec to IEEE sngl prec status = DFCIH(hpfp, i3efp) - IEEE dble prec to HP1000 dble prec status = FCIH(hpfp, i3efp) - IEEE sngl prec to HP1000 sngl prec Status = 0 if it worked. Hope this helps. -------------------------------------------------------------------------- Philip Walden Hewlett Packard Surface Mount Development Center 3500 Deer Creek Road Palo Alto, CA 94304 (408) 857-3899 --------------------------------------------------------------------------