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-Thread: 103376,509f8e43dc081fde X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <436924E2.AA708392@fakeaddress.nil> Date: Wed, 02 Nov 2005 21:43:14 +0100 From: Gautier Write-only X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Simulation of fixed point in c WITH DIFFERENT BIT-WIDTH References: <1130690498.388857.225170@g49g2000cwa.googlegroups.com> <1130690498.388857.225170@g49g2000cwa.googlegroups.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.76.239.209 X-Original-NNTP-Posting-Host: 83.76.239.209 X-Trace: news.bluewin.ch 1130964202 83.76.239.209 (2 Nov 2005 21:43:22 +0100) Organization: Bluewin AG Complaints-To: abuse@bluewin.ch X-Original-NNTP-Posting-Host: 127.0.0.1 Path: g2news1.google.com!news3.google.com!news.glorb.com!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.ip-plus.net!newsfeed.ip-plus.net!news.bluewin.ch!not-for-mail Xref: g2news1.google.com comp.lang.ada:6134 Date: 2005-11-02T21:43:14+01:00 List-Id: Colin Paul Gloster wrote: > > Mnamky did not say in > news:1130690498.388857.225170@g49g2000cwa.googlegroups.com that the > datatypes could take negative values, but anyway Gautier's > type F1 is delta 2.0**(-11) range -1.0 .. 1.0; > is a wasteful declaration which is bigger than Mnamky's "12-bit > wordlength and 11-bit fraction". > A two's complement signed 1 bit integer can have as its lowest value -1 > and as its greatest value 0. > So > type F3 is delta 2.0**(-11) range -1.0 .. 1.0 - 2.0**(-11); > type F4 is delta 2.0**(-14) range -2.0 .. 2.0 - 2.0**(-14); > are more appropiate datatypes. Thank you for this precision. Being sure that my approximation was quite rough, I had put the "something like" verbal precaution :-) G.