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-7-bit X-Google-Thread: 103376,4ac6504560f5ef27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-05 09:58:24 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!newspeer.monmouth.com!cyclone.bc.net!news-in.mts.net!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Little Endian -> Big Endian (Ada95 / GNAT), Whats with floating point types? References: <4046b474_1@127.0.0.1> <40487ac1_1@127.0.0.1> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 05 Mar 2004 12:53:16 -0500 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1078509136 198.96.223.163 (Fri, 05 Mar 2004 12:52:16 EST) NNTP-Posting-Date: Fri, 05 Mar 2004 12:52:16 EST Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:6090 Date: 2004-03-05T12:53:16-05:00 List-Id: I'll follow up to my other post as well... Warren W. Gay VE3WWG wrote: > pburnand0-news@yahoo.com wrote: >> Warren W. Gay VE3WWG wrote: >>> Marius Amado Alves wrote: >>> >>>>> ... Also, there is a small performance penalty paid for >>>>> shuffling bits around to achieve platform independence. >>>> >>>> But surely less than converting to an ASCII image and back. (I suspect >>>> that, contrary to what has been indicated, the significant performance >>>> loss in the ASCII solution is of time, not space.) >>>> >>>> But the ASCII solution is a nice, safe one if you don't have the >>>> time or >>>> the will or the possibility to learn to use or just to use the >>>> compiler's. Remember Ada has the wonderful 'Image and 'Value attributes >>>> which take care of the conversion for you. >>> >>> I'm no floating point numeric expert, but by converting to >>> a standard, say IEEE floating point format, you can still >>> represent a machine dependant number with repeating decimal >>> places in a IEEE floating point format (I assume). Mind >>> you, this depends heavily upon the differences between the >>> two formats. ... >> The floating point numbers are always rounded even in an FPU. No >> software, no hardware can handle an infinite number of digits... > > Of course. But my point was that some hardware does keep > a bit (IIRC), that indicates that this is a repeating > digit (binary/decimal). The point of this is to reduce > error. According to : http://www.csit.fsu.edu/~burkardt/papers/ieee.html there is no concept of a "repeating bit", as I vaguely remembered it. In fact, its possible that 1 bit cannot do this anyway, because you can have a group of digits repeat (to represent this, requires more than 1 bit). I can only guess that I recall some state information from a FPU design somewhere. -- Warren W. Gay VE3WWG http://ve3wwg.tk