Initial revision
[LeanCalc.git] / help / pix
1 NAME
2     pix - number of primes not exceeding specified number
3
4 SYNOPSIS
5     pix(n [,err])
6
7 TYPES
8     n           real
9     err         integer
10
11     return      nonnegative integer, or err
12
13 DESCRIPTION
14     If n is fractional or n >= 2^32, pix(n) causes an error,
15     pix(n, err) returns the value of err.
16
17     If n is an integer < 2^32, pix(n) returns the number of primes
18     (2, 3, 5, ...) less or equal to n.
19
20 EXAMPLE
21     > for (i = 0; i <= 20; i++) print pix(i),:;
22     0 0 1 2 2 3 3 4 4 4 4 5 5 6 6 6 6 7 7 8 8
23
24     > print pix(100), pix(1000), pix(1e4), pix(1e5), pix(1e6)
25     25 168 1229 9592 78498
26
27     > print pix(2^32 - 1, -1), pix(2^32, -1)
28     203280221 -1
29
30 LIMITS
31     none
32
33 LINK LIBRARY
34     long zpix(ZVALUE z)
35     FULL pix(FULL x)
36
37 SEE ALSO
38     XXX - fill in
39