Re: Q: Portable Ada floating-point binary I/O ?
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Sat, 26 Aug 2006 22:42:04 +0200
On Sat, 26 Aug 2006 21:02:47 +0200, Gautier wrote:
Does somebody know about a way of doing floating-point I/O which
is portable across architectures (endianesses etc.) and a little
bit more compact than the representation with digits ?
For network communications we send binary exponent and mantissa as signed
integers and then assemble them using corresponding floating-point
attributes. Integers are sent in a variable length format, which along with
a moderate compression effect, allows us to vary the mantissa length. So it
becomes independent on how many bits the mantissa has on the given host.
However, the problem is - what does "portable" mean here? Range and
precision cannot be portable, unless types aren't communicated as well.
If yes, is there an open-source Ada package doing it ?
Alas, it isn't. But it is easy to implement.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: Q: Portable Ada floating-point binary I/O ?
- From: Gautier
- Re: Q: Portable Ada floating-point binary I/O ?
- References:
- Q: Portable Ada floating-point binary I/O ?
- From: Gautier
- Q: Portable Ada floating-point binary I/O ?
- Prev by Date: Re: Simulating OS semaphore behavior
- Next by Date: Re: Gnat storage size
- Previous by thread: Q: Portable Ada floating-point binary I/O ?
- Next by thread: Re: Q: Portable Ada floating-point binary I/O ?
- Index(es):
Relevant Pages
|