Mercurial > octave
comparison scripts/specfun/factor.m @ 30330:01de0045b2e3
maint: Shorten some long lines to <= 80 characters (bug #57599)
* audiorecorder.m, disable_diagonal_matrix.m, disable_permutation_matrix.m,
disable_range.m, atan2d.m, accumdim.m, bitcmp.m, blkdiag.m, cplxpair.m,
dblquad.m, integral2.m, integral3.m, interp2.m, interpn.m, logspace.m,
delaunayn.m, griddata3.m, imread.m, genvarname.m, strread.m, nthargout.m,
parseparams.m, lsqnonneg.m, qp.m, sqp.m, material.m, __gnuplot_legend__.m,
plot.m, __gnuplot_drawnow__.m, polygcd.m, polyvalm.m, setdiff.m, fftfilt.m,
eigs.m, betainc.m, cosint.m, factor.m, gallery.m, toeplitz.m, discrete_cdf.m,
discrete_inv.m, discrete_pdf.m, iqr.m, kurtosis.m, quantile.m, bin2dec.m,
isstrprop.m, mat2str.m, strchr.m, strsplit.m, __have_feature__.m, datenum.m,
datevec.m, eomday.m, weboptions.m:
maint: Shorten some long lines to <= 80 characters.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 23 Nov 2021 13:28:34 -0800 |
parents | a49c635b179d |
children | 363fb10055df |
comparison
equal
deleted
inserted
replaced
30329:81d26e8481a6 | 30330:01de0045b2e3 |
---|---|
49 | 49 |
50 if (! isscalar (q) || ! isreal (q) || q < 0 || q != fix (q)) | 50 if (! isscalar (q) || ! isreal (q) || q < 0 || q != fix (q)) |
51 error ("factor: Q must be a real non-negative integer"); | 51 error ("factor: Q must be a real non-negative integer"); |
52 endif | 52 endif |
53 | 53 |
54 ## Special case if q is prime, because isprime() is now much faster than factor(). | 54 ## Special case if q is prime, because isprime() is now much faster than |
55 ## This also absorbs the case of q < 4, where there are no primes less than sqrt(q). | 55 ## factor(). This also absorbs the case of q < 4, where there are no primes |
56 ## less than sqrt(q). | |
56 if (q < 4 || isprime (q)) | 57 if (q < 4 || isprime (q)) |
57 pf = q; | 58 pf = q; |
58 n = 1; | 59 n = 1; |
59 return; | 60 return; |
60 endif | 61 endif |