From: Volker v. N. <va...@us...> - 2012-03-26 18:05:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima, A Computer Algebra System". The branch, master has been updated via f00f5337d93e963ffe83938b09a7e166b8e86a78 (commit) from 616f035f00c65c0eae1163b9801d867ceb6e3ba3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f00f5337d93e963ffe83938b09a7e166b8e86a78 Author: Volker van Nek <volker@uvw32.(none)> Date: Mon Mar 26 20:04:24 2012 +0200 add factors_only to Number.texi diff --git a/doc/info/Number.texi b/doc/info/Number.texi index 52341ea..6149c07 100644 --- a/doc/info/Number.texi +++ b/doc/info/Number.texi @@ -339,6 +339,23 @@ For the Euler-Mascheroni constant, see @code{%gamma}. @end deffn @c ----------------------------------------------------------------------------- +@anchor{factors_only} +@defvr {Option variable} factors_only +Standardwert: @code{false} + +Controls the value returned by @mrefdot{ifactors}. The default @code{false} +causes @code{ifactors} to provide information about multiplicities of the +computed prime factors. If @code{factors_only} is set to @code{true}, +@code{ifactors} returns nothing more than a list of prime factors. + +Example: See @mrefdot{ifactors}. + +@opencatbox +@category{Number theory} +@closecatbox +@end defvr + +@c ----------------------------------------------------------------------------- @anchor{fib} @deffn {Function} fib (@var{n}) @@ -411,13 +428,21 @@ For a positive integer @var{n} returns the factorization of @var{n}. If factors, ifactors returns @code{[[p1, e1], ... , [pk, ek]]}. Factorization methods used are trial divisions by primes up to 9973, -Pollard's rho method and elliptic curve method. +Pollard's rho and p-1 method and elliptic curves. + +The return value is controlled by the option variable @mrefdot{factors_only}. +The default @code{false} causes @code{ifactors} to provide information about +the multiplicities of the computed prime factors. If @code{factors_only} +is set to @code{true}, @code{ifactors} returns nothing more than a list of +prime factors. @example (%i1) ifactors(51575319651600); (%o1) [[2, 4], [3, 2], [5, 2], [1583, 1], [9050207, 1]] (%i2) apply("*", map(lambda([u], u[1]^u[2]), %)); (%o2) 51575319651600 +(%i3) ifactors(51575319651600), factors_only : true; +(%o3) [2, 3, 5, 1583, 9050207] @end example @opencatbox @@ -666,9 +691,9 @@ Miller-Rabin's test is used. If @code{primep (@var{n})} returns @code{true}, then @var{n} is a prime number. For @var{n} bigger than 341550071728321 @code{primep} uses -@code{primep_number_of_tests} Miller-Rabin's pseudo-primality tests and -one Lucas pseudo-primality test. The probability that @var{n} will pass -one Miller-Rabin test is less than 1/4. Using the default value 25 for +@code{primep_number_of_tests} Miller-Rabin's pseudo-primality tests and one +Lucas pseudo-primality test. The probability that a non-prime @var{n} will +pass one Miller-Rabin test is less than 1/4. Using the default value 25 for @code{primep_number_of_tests}, the probability of @var{n} beeing composite is much smaller that 10^-15. @@ -685,7 +710,7 @@ Default value: 25 Number of Miller-Rabin's tests used in @code{primep}. @opencatbox -@category{Predicate functions} @category{Number theory} +@category{Number theory} @closecatbox @end defvr ----------------------------------------------------------------------- Summary of changes: doc/info/Number.texi | 35 ++++++++++++++++++++++++++++++----- 1 files changed, 30 insertions(+), 5 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System |