Karim Belabas on Fri, 09 Jul 2004 22:48:45 +0200

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

Re: complex arithmetic

* Kerl, John [2004-07-06 18:57]:
> A starting point might be omega_n = Mod(x, polcyclo(N)) ...
>> I'd like to do exact arithmetic in Q[e^(Pi*I/n)]. for 
>> example, in GAP I would 
>> type "E(24) * E(24)" and it would output "E(12)"  (E(n) is 
>> e^(Pi*I/n) or 
>> somesuch in GAP). This is fine; however, GAP is woefully 
>> slow, and I want to 
>> use libPari, which is speedy. n is fixed before any 
>> computation starts. is 
>> there any way of doing this in Pari? thanks

I speed is of the essence, use Mod(x, x^N - 1), and reduce modulo
polcyclo(N) whenever equality tests are required. 

[ If you program in libpari, dump POLMODs as soon as possible and use
integer polynomial arithmetic. See src/modules/aprcl.c for some ideas... ]

Using complex or p-adic approximations is also often worth considering.


Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425   Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]