🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.ultrix
1 messages
1 total messages Started by Tom Kozon Thu, 28 Jan 1993 20:11
unix-ultrix VAX-IEEE number conversions
#7329
Author: Tom Kozon
Date: Thu, 28 Jan 1993 20:11
26 lines
1938 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads