## "Fossies" - the Fresh Open Source Software Archive ### Source code changes of the file "src/functions/operators/HEADER" betweenpari-2.13.0.tar.gz and pari-2.13.1.tar.gz

About: PARI/GP is a computer algebra system designed for fast computations in number theory (factorizations, algebraic number theory, elliptic curves...), but also contains a large number of other mathematical functions.

HEADER  (pari-2.13.0):HEADER  (pari-2.13.1)
skipping to change at line 238 skipping to change at line 238
\bprog \bprog
? a = 1 + O(2); b = a; ? a = 1 + O(2); b = a;
? a * a \\ = a^2, precision increases ? a * a \\ = a^2, precision increases
%2 = 1 + O(2^3) %2 = 1 + O(2^3)
? a * b \\ not rewritten as a^2 ? a * b \\ not rewritten as a^2
%3 = 1 + O(2) %3 = 1 + O(2)
? a*a*a \\ not rewritten as a^3 ? a*a*a \\ not rewritten as a^3
%4 = 1 + O(2) %4 = 1 + O(2)
@eprog @eprog
\item If the exponent is a rational number \item If the exponent is a rational number $p/q$ the behaviour depends
is on~$x$. If $x$ is a complex number, return $\exp(n \log x)$ (principal
in branch), in an exact form if possible:
\bprog \bprog
? 4^(1/2) \\ 4 being a square, this is exact ? 4^(1/2) \\ 4 being a square, this is exact
%1 = 2 %1 = 2
? 2^(1/2) \\ now inexact ? 2^(1/2) \\ now inexact
%2 = 1.4142135623730950488016887242096980786 %2 = 1.4142135623730950488016887242096980786
? (-1/4)^(1/2) \\ exact again
%3 = 1/2*I
? (-1)^(1/3)
%4 = 0.500...+ 0.866...*I
@eprog\noindent Note that even though $-1$ is an exact cube root of $-1$,
it is not $\exp(\log(-1)/3)$; the latter is returned.
Otherwise return a solution $y$ of $y^q = x^p$ if it exists; beware that
this is defined up to $q$-th roots of 1 in the base field. Intmods modulo
composite numbers are not supported.
\bprog
? Mod(7,19)^(1/2) ? Mod(7,19)^(1/2)
% = Mod(11, 19) \\ is any square root %1 = Mod(11, 19) \\ is any square root
? sqrt(Mod(7,19)) ? sqrt(Mod(7,19))
= Mod(8, 19) \\ is the smallest square root %2 = Mod(8, 19) \\ is the smallest square root
? Mod(1,4)^(1/2) ? Mod(1,4)^(1/2)
*** at top-level: Mod(1,4)^(1/2) *** at top-level: Mod(1,4)^(1/2)
*** ^------ *** ^------
*** _^_: not a prime number in gpow: 4. *** _^_: not a prime number in gpow: 4.
@eprog @eprog
\item If the exponent is a negative integer or rational number, \item If the exponent is a negative integer or rational number,
an \idx{inverse} must be computed. For noninvertible \typ{INTMOD} $x$, this an \idx{inverse} must be computed. For noninvertible \typ{INTMOD} $x$, this
will fail and (for $n$ an integer) implicitly exhibit a factor of the modulus: will fail and (for $n$ an integer) implicitly exhibit a factor of the modulus:
\bprog \bprog
End of changes. 4 change blocks.
6 lines changed or deleted 16 lines changed or added