/usr/share/calc/help/jacobi is in apcalc-common 2.12.4.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | NAME
jacobi - Jacobi symbol function
SYNOPSIS
jacobi(x, y)
TYPES
x integer
y integer
return 1, -1, or 0
DESCRIPTION
If y is a positive odd prime and x is an integer not divisible
by y, jacobi(x,y) returns the Legendre symbol function, usually
denoted by (x/y) as if x/y were a fraction; this has the value
1 or -1 according as x is or is not a quadratic residue modulo y.
x is a quadratic residue modulo y if for some integer u,
x = u^2 (mod y); if for all integers u, x != u^2 (mod y), x
is said to be a quadratic nonresidue modulo y.
If y is a positive odd prime and x is divisible by y, jacobi(x,y)
returns the value 1. (This differs from the zero value usually
given in number theory books for (x/y) when x and y
are not relatively prime.)
assigned to (x/y) O
If y is an odd positive integer equal to p_1 * p_2 * ... * p_k,
where the p_i are primes, not necessarily distinct, the
jacobi symbol function is given by
jacobi(x,y) = (x/p_1) * (x/p_2) * ... * (x/p_k).
where the functions on the right are Legendre symbol functions.
This is also often usually by (x/y).
If jacobi(x,y) = -1, then x is a quadratic nonresidue modulo y.
Equivalently, if x is a quadratic residue modulo y, then
jacobi(x,y) = 1.
If jacobi(x,y) = 1 and y is composite, x may be either a quadratic
residue or a quadratic nonresidue modulo y.
If y is even or negative, jacobi(x,y) as defined by calc returns
the value 0.
EXAMPLE
; print jacobi(2,3), jacobi(2,5), jacobi(2,15)
-1 -1 1
; print jacobi(80,199)
1
LIMITS
none
LINK LIBRARY
NUMBER *qjacobi(NUMBER *x, NUMBER *y)
FLAG zjacobi(ZVALUE z1, ZVALUE z2)
SEE ALSO
## Copyright (C) 1999 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
##
## @(#) $Revision: 30.1 $
## @(#) $Id: jacobi,v 30.1 2007/03/16 11:10:42 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/jacobi,v $
##
## Under source code control: 1995/12/18 12:34:57
## File existed as early as: 1995
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|