Mercurial > octave
view CITATION @ 31107:bbb59cc6698c stable
factor.m: Performance tweak to avoid division in certain cases
factor.m: For large numbers where only one factor lies outside the fast
first round of divisions, check if it is prime before calling primes ()
trying to factorize it. This is up to 8000X faster for such numbers,
and for an "average" input it gives a 22% to 40% speedup over a large
number of trials.
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sat, 25 Jun 2022 16:40:36 -0400 |
parents | 04120d65778a |
children | 6c1e310b2230 |
line wrap: on
line source
To cite GNU Octave in publications use: John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring (2022). GNU Octave version 7.1.0 manual: a high-level interactive language for numerical computations. URL https://www.gnu.org/software/octave/doc/v7.1.0/ A BibTeX entry for LaTeX users is: @manual{, title = {{GNU Octave} version 7.1.0 manual: a high-level interactive language for numerical computations}, author = {John W. Eaton and David Bateman and S{\o}ren Hauberg and Rik Wehbring}, year = {2022}, url = {https://www.gnu.org/software/octave/doc/v7.1.0/}, } We have invested a lot of time and effort in creating GNU Octave, please cite it when using it. See also 'citation pkgname' for citing Octave packages.