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 Path: g2news1.google.com!news4.google.com!news.glorb.com!koehntopp.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Simulation of fixed point in c WITH DIFFERENT BIT-WIDTH Date: Thu, 03 Nov 2005 20:55:53 +0000 Organization: Pushface Message-ID: References: <1130690498.388857.225170@g49g2000cwa.googlegroups.com> <1130690498.388857.225170@g49g2000cwa.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1131051352 3207 62.49.19.209 (3 Nov 2005 20:55:52 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 3 Nov 2005 20:55:52 +0000 (UTC) Cancel-Lock: sha1:r5SmogDDeqtyTb/p+qyA/2vOPbY= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:6158 Date: 2005-11-03T20:55:53+00:00 List-Id: "Dmitry A. Kazakov" writes: > The abstraction many people mean is actually: > > type Fraction is delta <> range -1.0 .. 1.0; > for Fraction'Size use 16*8; -- Give me as much as you can > > So delta isn't exactly 2.0**(-15), it is 2.0/(2.0**16 + 1.0). When dealing with legacy software/hardware, which is the only reason I'd expect to use fixed point, one really does mean 2.0/(2.0**16)!