Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* VAX D_FLOAT to IEEE conversion
@ 1994-02-09  1:08 William Basden
  1994-02-09  6:01 ` David Bellamy
  0 siblings, 1 reply; 3+ messages in thread
From: William Basden @ 1994-02-09  1:08 UTC (permalink / raw)


Does anyone have code to convert VAX D_FLOAT numbers into IEEE double 
format?  

I've got some VAX/VMS files that I need to read in on an Alpha OSF/1
machine.  On our DECstations (Ultrix), there was a library function
called dtoi() that would do this for us, but it does not seem to exist
on DEC OSF/1.

Thanks,

Bill Basden

 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VAX D_FLOAT to IEEE conversion
  1994-02-09  1:08 VAX D_FLOAT to IEEE conversion William Basden
@ 1994-02-09  6:01 ` David Bellamy
  1994-02-10  1:05   ` William Basden
  0 siblings, 1 reply; 3+ messages in thread
From: David Bellamy @ 1994-02-09  6:01 UTC (permalink / raw)


In article <2j9d35$poe@coyote.rain.org>, wns@coyote.rain.org (William
Basden) wrote:

> Does anyone have code to convert VAX D_FLOAT numbers into IEEE double 
> format?  
> 
> I've got some VAX/VMS files that I need to read in on an Alpha OSF/1
> machine.  On our DECstations (Ultrix), there was a library function
> called dtoi() that would do this for us, but it does not seem to exist
> on DEC OSF/1.
> 

Check the convert keyword in the open statement.

To quote from the VMS help file:

			       The formats available, in addition to the
          native VAX floating and little-endian integer types are:
          IEEE little-endian floating and integers (compatible with
          Alpha AXP and RISC DECstation systems, Intel processors),
          IEEE big-endian floating and integers (Sun, IBM RS-6000,
          etc.), CRAY big-endian floating and integers and IBM
          System\370 big-endian floating and integers.


-- 
David Bellamy.
Deparment of Commerce.  The University of Queensland.   Australia.
Internet:   bellamy@commerce.uq.edu.au


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: VAX D_FLOAT to IEEE conversion
  1994-02-09  6:01 ` David Bellamy
@ 1994-02-10  1:05   ` William Basden
  0 siblings, 0 replies; 3+ messages in thread
From: William Basden @ 1994-02-10  1:05 UTC (permalink / raw)


David Bellamy (bellamy@commerce.uq.edu.au) wrote:
> > Does anyone have code to convert VAX D_FLOAT numbers into IEEE double 
> > format?  

> Check the convert keyword in the open statement.

This is being used from C, not FORTRAN.  We read the floats into a buffer
(actually a double, since the D_FLOATING and the double IEEE are the same
size), then we need to swap the bits around to get it into a usable form.

Thanks anyway.

Bill Basden





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1994-02-10  1:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-02-09  1:08 VAX D_FLOAT to IEEE conversion William Basden
1994-02-09  6:01 ` David Bellamy
1994-02-10  1:05   ` William Basden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox