mpz_powm function for complex and adjoined numbers
Paul Zimmermann
Paul.Zimmermann at loria.fr
Sat Apr 24 10:45:52 CEST 2010
Dear Bernhard,
> Date: Sat, 24 Apr 2010 07:50:51 +0200
> From: "Bernhard Helmes" <bhelmes at gmx.de>
>
> A beautifull day,
>
> is there a powermod function for complex numbers and adjoined numbers ?
>
> Adjoined numbers are for example (1 + sqrt (2))
> The square root is adjoined. These numbers build a mathematical corpus.
>
> Both algorithms can be done with fast binary quadration modulo a number.
>
> Best regards
> Bernhard Helmes
GMP does not provide this, but Sage (sagemath.org) does:
sage: R.<x> = PolynomialRing(ZZ)
sage: Q.<x> = QuotientRing(R,x^2 - 2*x - 1)
sage: Q
Univariate Quotient Polynomial Ring in x over Integer Ring with modulus x^2 - 2*x - 1
sage: x^42
4217293152016490*x + 1746860020068409
Paul Zimmermann
More information about the gmp-discuss
mailing list