comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IEEE Standard 754 floating point number
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IEEE Standard 754 floating point number [message #4210] Sun, 14 May 1995 00:00 Go to next message
bso is currently offline  bso
Messages: 3
Registered: May 1995
Junior Member
-----BEGIN PGP SIGNED MESSAGE-----


I'm using the Macintosh version of IDL that supports 32-bit floats and 64-bit
double precision floats. I need to read some 80-bit IEEE Standard 754 floats
from a binary file. If I read those 10 bytes with a READU into a BYTARR(10),
how do I get a floating-point value out of that byte array?

Bosco So | bso@acm.org
PGP public key | http://www.ultranet.com/~bso/pgp/


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBL7ZE81lxq0cK9TLZAQFiqwP+JWomk95PHWhGUdZuO/2RTSrIgMD2 1Xc7
+TmPYl0Vkq2uOoWJUQDbaRpKZZWq7NIhrPc5mnOXw7qQwLbajMyospVARZ9n rAZh
xc2nIbsG1uf7Vl9g8Hhe2mtuGE5xg3e4+eNBLCNeci7Ba8otAcgbgjX3kiIg xr3z
p1ITINJDrEI=
=oskH
-----END PGP SIGNATURE-----
Re: IEEE Standard 754 floating point number [message #4274 is a reply to message #4210] Thu, 18 May 1995 00:00 Go to previous message
lmudge is currently offline  lmudge
Messages: 9
Registered: October 1994
Junior Member
In article 1405951400220001@bso.tiac.net, bso@acm.org (Bosco Y. So) writes:
> -----BEGIN PGP SIGNED MESSAGE-----
>
>
> I'm using the Macintosh version of IDL that supports 32-bit floats and 64-bit
> double precision floats. I need to read some 80-bit IEEE Standard 754 floats
> from a binary file. If I read those 10 bytes with a READU into a BYTARR(10),
> how do I get a floating-point value out of that byte array?
>
> Bosco So | bso@acm.org
> PGP public key | http://www.ultranet.com/~bso/pgp/>

The most obvious option would be to use IDL's bolean algebra capabilities
(e.g. not or and ishift etc.) to create a routine that converts this data to
a double precision value. This would result in a loss of precision because
this is only 64 bit IEEE floating point. The next version of IDL (v4.0)
will support double precision complex data type which you could also
use to store your values in but you would need to create your own
routine to perform basic operations on this data e.g. addition. This is
probablly not feasible.

On a brighter note I have written a routine to convert values read from
Turbo Pascal files using the word data type (16 bit unsigned integers) to
IDL longword variables. If anyone would like it send me email.

Leith Mudge.


------------------------------------------------------------ --------------------
Leith Mudge
lmudge@awadi.com.au
AWA Defence Industries
PO Box 161
Elizabeth SA 5112
Australia
Phone: +61 8 256 0952
Fax: +61 8 255 9117

Microsoft Network is prohibited from redistributing this work in any form,
in whole or in part. Copyright, Leith Mudge, 1995
License to distribute this post is available to Microsoft for $1000.
Posting without permission constitutes an agreement to these terms.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Registration of 3D medical images
Next Topic: Reading IEEE floating point on DEC OpenVMS

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:48:48 PDT 2025

Total time taken to generate the page: 0.00747 seconds