Re: [boost] Interest in an arbitrary precision library?

----Original Message---- From: Daryle Walker [mailto:darylew@hotmail.com] Sent: 14 September 2005 07:12 To: Boost mailing list Subject: Re: [boost] Interest in an arbitrary precision library?
On 9/13/05 7:28 AM, "Andy Little" <andy@servocomm.freeserve.co.uk> wrote:
"Daryle Walker" <darylew@hotmail.com> wrote
OK. When you say "arbitrary precision," you mean that a precision limit must be set (at run-time) before an operation. Most people use "arbitrary precision" to mean unlimited precision, not your "run-time cut-off" precision.
Are there really libraries that have unlimited precision? What happens when the result of a computation is irrational?
You can't store it conventionally, since such numbers would need an infinite amount of memory. You would just give up and have to define some sort of rounding/cut-off philosophy. As another poster said, you could store the irrational components of a number with some sort of formula (but only for algebraically irrational numbers, not transcendentally irrational numbers).
Why only for algebraiclly irrational numbers? There is no reason (in principle) that the representation of an irrational shouldn't include trig / hyperbolic / bessel functions of irrationals, or even definite integrals. Of course, at this point you get close to rewriting a chunk of Matlab or Mathematica. On the other hand, simplifying (sqrt(5)-sqrt(3))*(sqrt(5)+sqrt(3)) to exactly 2 is quite a challenge too (and if you don't then the unlimited precision representation doesn't really buy you anything). -- Martin Bonner Martin.Bonner@Pitechnology.com Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 441434
participants (1)
-
Martin Bonner