From: Gautier <Gautier.deMontmollin@maths.unine.ch>
Subject: Re: ratioanl number type
Date: 1999/12/03
Date: 1999-12-03T00:00:00+00:00 [thread overview]
Message-ID: <38478F43.1690EFFA@maths.unine.ch> (raw)
In-Reply-To: 38473D8A.9BB68676@gte.net
> 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.
A thing to do is to combine a generic code to obtain the fraction
field of an (euclidean) ring, with multi-precision integers,
so you can choose the two component independently.
All ingredients are there
http://lglwww.epfl.ch/Team/MW/mw_components.html
You can also take my generic code (frac) in mathpaqs.zip
http://members.xoom.com/gdemont/gsoft.htm
and use one of the multi-precision packs from there
http://members.xoom.com/gnatlist/
NB: no bug-free warranty in any I think ... ;-)
HTH
--
Gautier
next prev parent reply other threads:[~1999-12-03 0:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-03 0:00 ratioanl number type Clifford J. Nelson
1999-12-03 0:00 ` Gautier [this message]
1999-12-03 0:00 ` Tucker Taft
1999-12-03 0:00 ` Dmitriy Anisimkov
1999-12-11 0:00 ` Clifford J. Nelson
[not found] ` <01bf43ea$646d5bc0$022a6282@dieppe>
1999-12-11 0:00 ` Clifford J. Nelson
[not found] ` <01bf43f3$3aadb600$022a6282@dieppe>
1999-12-11 0:00 ` Vladimir Olensky
1999-12-12 0:00 ` Robert Dewar
1999-12-12 0:00 ` Vladimir Olensky
1999-12-12 0:00 ` MMX (was Re: ratioanl number type) Vladimir Olensky
1999-12-14 0:00 ` ratioanl number type Robert Dewar
1999-12-17 0:00 ` Gisle S�lensminde
1999-12-19 0:00 ` Robert Dewar
1999-12-12 0:00 ` Robert Dewar
1999-12-11 0:00 ` Robert Dewar
1999-12-09 0:00 ` rational " Wes Groleau
-- strict thread matches above, loose matches on Subject: below --
1999-12-15 0:00 ratioanl " Alexander E. Kopilovitch
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox