Mercurial > octave
changeset 32159:efcfafb7ad16 stable
doc: Add note to isprime.m on inputs over 2^64.
* isprime.m: Add note pointing the user to the Symbolic package for
inputs over 2^64, similar to the help for factor.m.
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Wed, 21 Jun 2023 16:37:33 -0400 |
parents | 0cedac4984ae |
children | 93d3bcced10e fab3e312a0b4 |
files | scripts/specfun/isprime.m |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/specfun/isprime.m Sun Jun 11 21:30:23 2023 -0700 +++ b/scripts/specfun/isprime.m Wed Jun 21 16:37:33 2023 -0400 @@ -66,6 +66,17 @@ ## @ifnottex ## < 2^64. ## @end ifnottex +## Cast inputs larger than @code{flintmax} to @code{uint64}. +## +## For larger inputs, use ‘sym’ if you have the Symbolic package installed +## and loaded: +## +## @example +## @group +## isprime (sym ('58745389709258902525390450') + (0:4)) +## @result{} 0 1 0 0 0 +## @end group +## @end example ## ## Compatibility Note: @sc{matlab} does not extend the definition of prime ## numbers and will produce an error if given negative or complex inputs.