h.pgen

来自「强大的数学工具包」· PGEN 代码 · 共 44 行

PGEN
44
字号
                               * * * * * * *                               *   pgen    *                               * * * * * * *        "prime generator"        SYNTAX: X = pgen(a, b)        a an b are expressions whose values are positive integers,         a <= b.        pgen displays a list of all primes with a <= p <= b.        If [a, b] contains at least one prime, the smallest prime        in [a, b] is assigned to X; otherwise, X = 0.        All prime numbers in [a, b] besides X are stored in increasing        order in AV (see "?avfunc").        Warning: If you want only to construct one prime, please use                 pconstr.        Example 1: (correct)                p = pgen(2^30, 2^30 + 10)        Example 2: (correct)                pgen(12, 100)        Example 3: (incorrect)                pgen(-4, 3)_ERR_NR_034_pgen_                     Example 4: (incorrect)                 pgen(2^35, 2^34)                _ERR_NR_034_pgen_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?