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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a30e9cc47b5029fe X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: ratioanl number type Date: 1999/12/03 Message-ID: <3847E553.1452CA24@averstar.com>#1/1 X-Deja-AN: 556238965 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <38473D8A.9BB68676@gte.net> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-12-03T00:00:00+00:00 List-Id: "Clifford J. Nelson" wrote: > > Are there any Ada95 examples in books or on the web that implement the > exact rational number data type with overloading of all appropriate > arithmetic operations and conversion to and from other number types, all > in Ada95 without anything relating to the platform it will run on? It > goes without saying that it is too difficult to predict the number of > digits that the numerator and denominator need to have, so, available > memory should be the only limit to their size. We created this for our Ada 83 compiler long ago. It is written in Ada 83. Here is a link to it. It worked for years, but we are not in a position to provide a warranty on it... http://www.averstar.com/~stt/_adasource/ Post a reply if you find an obvious stupidity in it somewhere. Enjoy... > Cliff Nelson -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA