Chinese theorem



Hello,

there is a package gf about finite fields in /share/contrib/gf
See pdf-documentation there.
It also contains a (undocumented) function chrem, which implements the
chinese remainder theorem.

(%i1) load(gf);
(%o1)       /usr/local/share/maxima/5.19.1/share/contrib/gf/gf.mac
(%i2) rems: [2,9]$
(%i3) mods: [10,11]$
(%i4) chrem(rems, mods);
(%o4)                                 42

If you want to compute remainders according to given moduli, you can
define a function like the following

(%i5) f(n, mods):= map(lambda([m],mod(n,m)), mods)$
(%i6) f(42,mods);
(%o6)                               [2, 9]

Hope that helps

Volker van Nek


Am Sonntag, den 29.11.2009, 10:57 +0000 schrieb ???????????? ??????:
> 
> Hello,again...Does anyone know if there is a function in maxima tha
> solves the chinese remainder theorem???I am searching all day and i
> can't find... if anyone can help me i would appreciate it...Thanks for
> your time!I need it for an exercise for the university
> 
> 
> ______________________________________________________________________
> Keep your friends updated- even when you're not signed in.
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima