2 pfact - product of primes up to specified integer
10 return positive integer
13 Returns the product of primes p_i for which p_i <= n.
16 ; for (i = 0; i <= 16; i++) print pfact(i),:;
17 1 1 2 6 6 30 30 210 210 210 210 2310 2310 30030 30030 30030 30030
23 NUMBER *qpfact(NUMBER *n)
24 void zpfact(ZVALUE z, ZVALUE *dest)
27 factor, isprime, lfactor, nextcand, nextprime, prevcand, prevprime,
28 pix, ptest, fact, lcmfact
30 ## Copyright (C) 1999-2006 Landon Curt Noll
32 ## Calc is open software; you can redistribute it and/or modify it under
33 ## the terms of the version 2.1 of the GNU Lesser General Public License
34 ## as published by the Free Software Foundation.
36 ## Calc is distributed in the hope that it will be useful, but WITHOUT
37 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
38 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
39 ## Public License for more details.
41 ## A copy of version 2.1 of the GNU Lesser General Public License is
42 ## distributed with calc under the filename COPYING-LGPL. You should have
43 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
44 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
46 ## @(#) $Revision: 30.1 $
47 ## @(#) $Id: pfact,v 30.1 2007/03/16 11:10:42 chongo Exp $
48 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pfact,v $
50 ## Under source code control: 1995/12/18 12:34:57
51 ## File existed as early as: 1995
53 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
54 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/