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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada,comp.lang.c++ Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) From: Jim Rogers References: <1110329098.642196@athnrd02> <1110361741.551255@athnrd02> <422edaec$0$26554$9b4e6d93@newsread4.arcor-online.net> <1111464133.508323@athnrd02> <423fe9df$0$11476$9b4e6d93@newsread2.arcor-online.net> <1111521825.653841@athnrd02> <424094b0$0$11481$9b4e6d93@newsread2.arcor-online.net> <1111568404.687226@athnrd02> <1111572591.296439@athnrd02> <1111574207.72969@athnrd02> <42414f88$0$9217$9b4e6d93@newsread4.arcor-online.net> <1111576802.823362@athnrd02> <1111577078.934620@athnrd02> <1111586334.958702.249050@o13g2000cwo.googlegroups.com> <1111608867.922129@athnrd02> <1111631889.495954@athnrd02> User-Agent: Xnews/5.04.25 Message-ID: Date: Thu, 24 Mar 2005 02:50:59 GMT NNTP-Posting-Host: 12.73.181.213 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1111632659 12.73.181.213 (Thu, 24 Mar 2005 02:50:59 GMT) NNTP-Posting-Date: Thu, 24 Mar 2005 02:50:59 GMT Organization: AT&T Worldnet Xref: g2news1.google.com comp.lang.ada:9877 comp.lang.c++:46978 Date: 2005-03-24T02:50:59+00:00 List-Id: Ioannis Vranos wrote in news:1111631889.495954@athnrd02: > Jim Rogers wrote: >> For instance, in Ada it is trivial to define a floating point type >> with 10 decimal digits of precision and all values in the range of >> 0.0 through 1.0. >> >> This sort of type is very useful for defining normalized values. >> >> type Normalized is digits 10 range 0.0..1.0; >> > > > There are C++ libraries that provide such functionality. I suppose one > of them is GMP: > > http://www.swox.com/gmp > > > http://www.swox.com/gmp/manual/Floating-point-Functions.html#Floating-p > oint%20Functions My reading of the information at that url indicates that GMP allows the specification of precision, but not the specification of a limited range of valid values. The Ada example above specifies a precision of 10 digits and also specifies a range of valid values from 0.0 through 1.0. Jim Rogers