James Wanless on Wed, 14 Mar 2012 11:02:04 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: sqrtint for rationals


Hi Karim (Belabas),
Thanks very much for your response.
Actually Andreas (Enge) has already set me straight (off-list) very nicely wrt this: The problem (I understand) is one of speed/accuracy trade-off. Andreas mentioned that number theory software (eg pari/gp !!! :)))) already does this as much as it can with simple fractions, but, that this is just too totally infeasible from a speed point-of-view w/ more complex fractions/operations [as you mention too!] Thanks to all on the list for indulging me w/ my original query - hopefully it wasn't _too_ off-topic or trivial - I (for one at any rate) certainly learnt something...
Thanks again, and Happy Pi Day!
J

On 14 Mar 2012, at 09:52, Karim Belabas wrote:

* James Wanless [2012-03-14 10:18]:
Speaking of which, I _think_ I might have a solution for the Table- maker's
dilemma:
Specifically, if one has available integers of any length already ie
thru' GMP, then why can't one just use _perfectly correct_ rationals
(described as two integers, top and bottom of a fraction) [a little
bit akin to two-coordinate complex numbers].
I don't see why then one couldn't carry through rationals w/ perfect
accuracy thru all operations...

Try to make it work with "operation" = exp(), for instance.
You'll see the problem. :-)

Cheers,

   K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation http://www.math.u-bordeaux1.fr/ ~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP]
`