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,db88d0444fafe8eb X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!news.banetele.no!news.hacking.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Arrays indexed by fixed point types (Was: Surprise in array concatenation) Date: 05 Sep 2005 11:32:23 +0200 Organization: Jacob's private Usenet server Sender: sparre@hugin.crs4.it Message-ID: References: <1125544603.561847.32140@g47g2000cwa.googlegroups.com> <1125610942.747981.280770@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: hugin.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: jacob-sparre.dk 1125912364 6634 156.148.71.67 (5 Sep 2005 09:26:04 GMT) X-Complaints-To: sparre@jacob-sparre.dk NNTP-Posting-Date: Mon, 5 Sep 2005 09:26:04 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news1.google.com comp.lang.ada:4434 Date: 2005-09-05T11:32:23+02:00 List-Id: Jean-Pierre Rosen skrev: > >>The values are integral multiples of small, which can be supplied > >>by the user. So I'd expect to be able to use fixed point types as > >>array indices etc. You cant :( Wouldn't fixed point be *much* > >>more useful if it was discrete? > > That's the view of the solution space. The view of the problem space > is that they are a different approximation of real numbers (floating > point values being the other one). And you can't index an array with > real values, whether float or fixed. I find that definition of arrays rather limited. I have some cases, where my problem is to store data in an array indexed by an approximation of real numbers. The most obvious (and recurring) example is a histogram of real valued samples. As it is now, I have to mess around with mapping my (approximated) real numbers onto an integer scale and back again. Greetings, Jacob -- ACRONYM: A Contrived Reduction Of Nomenclature Yielding Mnemonics