| Line 23... |
Line 23... |
| 23 |
\code{nextn()} is intended to be used to find a suitable length
|
23 |
\code{nextn()} is intended to be used to find a suitable length
|
| 24 |
to zero-pad the argument of \code{\link{fft}}
|
24 |
to zero-pad the argument of \code{\link{fft}}
|
| 25 |
so that the transform is computed quickly.
|
25 |
so that the transform is computed quickly.
|
| 26 |
The default value for \code{factors} ensures this.
|
26 |
The default value for \code{factors} ensures this.
|
| 27 |
}
|
27 |
}
|
| - |
|
28 |
\value{a vector of the same \code{\link{length}} as \code{n}, of type
|
| - |
|
29 |
\code{"integer"} when the values are small enough (determined before
|
| - |
|
30 |
computing them) and \code{"double"} otherwise.
|
| - |
|
31 |
}
|
| 28 |
\note{If the factors in \code{factors} are \emph{not} relative prime,
|
32 |
\note{If the factors in \code{factors} are \emph{not} relative prime,
|
| 29 |
i.e., have themselves a common factor larger than one, the result may
|
33 |
i.e., have themselves a common factor larger than one, the result may
|
| 30 |
be wrong in the sense that it may not be the \emph{smallest} integer.
|
34 |
be wrong in the sense that it may not be the \emph{smallest} integer.
|
| 31 |
E.g., \code{nextn(91, c(2,6))} returns 128 instead of 96 as
|
35 |
E.g., \code{nextn(91, c(2,6))} returns 128 instead of 96 as
|
| 32 |
\code{nextn(91, c(2,3))} returns.
|
36 |
\code{nextn(91, c(2,3))} returns.
|
| - |
|
37 |
|
| - |
|
38 |
When the resulting \code{N <- nextn(..)} is larger than \code{2^53}, a
|
| - |
|
39 |
warning with the true 64-bit integer value is signalled, as integers
|
| - |
|
40 |
above that range may not be representable in double precision.
|
| - |
|
41 |
|
| - |
|
42 |
If you really need to deal with such large integers, it may be
|
| - |
|
43 |
advisable to use package \CRANpkg{gmp}.
|
| 33 |
}
|
44 |
}
|
| 34 |
\seealso{
|
45 |
\seealso{
|
| 35 |
\code{\link{convolve}}, \code{\link{fft}}.
|
46 |
\code{\link{convolve}}, \code{\link{fft}}.
|
| 36 |
}
|
47 |
}
|
| 37 |
\examples{
|
48 |
\examples{
|