How to byte swap an IEEE Float?
- From: "Björn" <ssh9614@xxxxxxxxxxx>
- Date: 28 Jun 2005 06:53:42 -0700
I need to read some float values from file that have been written in
big-endian byte order from a c-program. The simple swapping procedure
that I have just interchanges the byte order of type IEEE_Float_32 to
get little-endian. The problem is that for some values (eg. 33.229000)
it is a "NaN" when doing IEEE_Float_32'Read and I get a constraint
error (invalid data) from stream_io when the value is read. How do I
get around this?
Thanks
Björn
.
- Follow-Ups:
- Re: How to byte swap an IEEE Float?
- From: Damien
- Re: How to byte swap an IEEE Float?
- From: Stephen Leake
- Re: How to byte swap an IEEE Float?
- From: Martin Dowie
- Re: How to byte swap an IEEE Float?
- From: Marius Amado Alves
- Re: How to byte swap an IEEE Float?
- Prev by Date: ANN: Ada 2005 standard container library tutorial available
- Next by Date: Re: How to byte swap an IEEE Float?
- Previous by thread: ANN: Ada 2005 standard container library tutorial available
- Next by thread: Re: How to byte swap an IEEE Float?
- Index(es):
Relevant Pages
|