From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,4ac6504560f5ef27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-29 08:36:36 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Little Endian -> Big Endian (Ada95 / GNAT), Whats with floating point types? Date: 29 Feb 2004 16:32:52 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.demon.co.uk 1078072595 25788 62.49.19.209 (29 Feb 2004 16:36:35 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 29 Feb 2004 16:36:35 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:5949 Date: 2004-02-29T16:32:52+00:00 List-Id: "Joachim Schr�er" writes: > A short question: > > It's not so simple with floating point types, just swapping bytes, > or is it? One has to swap all the bits or? > Interfaces.IEEE_Float_32 has 1 bit sign, 23 bit mantissa and 8 bit > exponent, Interfaces.IEEE_Float_64 has 1 bit sign, 52 bit mantissa > and 11 bit exponent when I remember correctly. Swapping seems to work just fine here ... even though if you look at GNAT's xdr support it is much more complicated. -- Simon Wright 100% Ada, no bugs.