* unix-ultrix VAX-IEEE number conversions
@ 1993-01-28 20:11 Tom Kozon
0 siblings, 0 replies; only message in thread
From: Tom Kozon @ 1993-01-28 20:11 UTC (permalink / raw)
Hello,
I am currently in the process of porting some software from
one system (DEC VAX 785 running BSD 4.3 unix) to another (Decsystem
5100 running ULTRIX RISC V4.2). Some of this software has the function of
reading a binary stream of VAX data. While integer data types are read on
the Decsystem with no difficulties, I am finding that I will need to
convert floating point and double precision numbers from VAX into IEEE
format. So far, I've written a couple of standalone test programs (running
on the Decsystem) using the C library functions developed to do these
conversions. I've been able to successfully use " ftoi " to make accurate
floating point conversions with no problems. However, the function that
transforms the double precision numbers (i.e., " dtoi ") seems to present
some special difficulties. In general, it seems to convert a VAX double
precision number into its IEEE format (mostly, but sometimes not), but
almost never returns a " 0 " integer value indicating the conversion
has been successfully made. According to the on-line documentation, if
this function returns a non-zero value, it does not do the conversion.
So, why would my experience be accurate transformations with nonzero
function return values? The C program that uses dtoi generally works
in the same manner as the one using ftoi, so these results seem surprising.
Any suggestions/clues on this matter would be greatly appreciated --
thanks in advance for posted and/or E-mail replies!
Tom
kozon@eos.arc.nasa.gov
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1993-01-28 20:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-01-28 20:11 unix-ultrix VAX-IEEE number conversions Tom Kozon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox