source: git/factory/cfNTLzzpEXGCD.h

spielwiese
Last change on this file was fea494, checked in by Hans Schoenemann <hannes@…>, 10 years ago
format
  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*****************************************************************************\
2 * Computer Algebra System SINGULAR
3\*****************************************************************************/
4/** @file cfNTLzzpEXGCD.h
5 *
6 * This file defines functions for univariate GCD and extended GCD
7 * over Z/p[t]/(f)[x] for reducible f
8 *
9 * @note the following code is slightly modified code out of
10 * lzz_pEX.h from Victor Shoup's NTL. Below is NTL's copyright notice.
11 *
12 * ABSTRACT: Langemyr, McCallum "The Computation of Polynomial Greatest Common
13 * Divisors over an algebraic number fields"
14 *
15 * @author Martin Lee
16 *
17
18
19                  COPYRIGHT NOTICE
20                    for NTL 5.5
21          (modified for Singular 2-0-6 - 3-1)
22
23NTL -- A Library for Doing Number Theory
24Copyright (C) 1996-2009  Victor Shoup
25
26The most recent version of NTL is available at http://www.shoup.net
27
28This program is free software; you can redistribute it and/or
29modify it under the terms of the GNU General Public License
30as published by the Free Software Foundation; either version 2
31of the License, or (at your option) any later version.
32
33This program is distributed in the hope that it will be useful,
34but WITHOUT ANY WARRANTY; without even the implied warranty of
35MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36GNU General Public License for more details.
37
38You should have received a copy of the GNU General Public License
39along with this program; if not, write to the Free Software
40Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
41
42This entire copyright notice should be placed in an appropriately
43conspicuous place accompanying all distributions of software that
44make use of NTL.
45
46The above terms apply to all of the software modules distributed with NTL,
47i.e., all source files in either the ntl-xxx.tar.gz or WinNTL-xxx.zip
48distributions.  In general, the individual files do not contain
49copyright notices.
50
51Note that the quad_float package is derived from the doubledouble package,
52originally developed by Keith Briggs, and also licensed unger the GNU GPL.
53The files quad_float.c and quad_float.h contain more detailed copyright
54notices.
55
56Note that the traditional long integer package used by NTL, lip.c, is derived
57from---and represents an extensive modification of---
58a package originally developed and copyrighted by Arjen Lenstra,
59who has agreed to renounce any copyright claims on the particular
60version of the long integer package appearing in NTL, so that the
61this package now is covered by the GNU GPL as well.
62
63Note that the alternative long integer package used by NTL is GMP,
64which is written by Torbjorn Granlund <tege@swox.com>.
65GMP is licensed under the terms of the GNU Lesser General Public License.
66
67Note that NTL makes use of the RSA Data Security, Inc. MD5 Message
68Digest Algorithm.
69
70Note that prior to version 4.0, NTL was distributed under the following terms:
71   NTL is freely available for research and educational purposes.
72   I don't want to attach any legalistic licensing restrictions on
73   users of NTL.
74   However, NTL should not be linked in a commercial program
75   (although using data in a commercial
76   product produced by a program that used NTL is fine).
77
78The hope is that the GNU GPL is actually less restrictive than these
79older terms;  however, in any circumstances such that GNU GPL is more
80restrictive, then the following rule is in force:
81versions prior to 4.0 may continue to be used under the old terms,
82but users of versions 4.0 or later should adhere to the terms of the GNU GPL.
83**/
84
85
86#ifndef CF_NTL_ZZ_PEX_GCD_H
87#define CF_NTL_ZZ_PEX_GCD_H
88
89// #include "config.h"
90
91#ifdef HAVE_NTL
92#include "NTLconvert.h"
93#endif
94
95#ifdef HAVE_NTL
96/// compute the GCD x of a and b, fail is set to true if a zero divisor is
97/// encountered
98void tryNTLGCD(zz_pEX& x,      ///<[in,out] GCD of a and b
99               const zz_pEX& a,///<[in]     s.a.
100               const zz_pEX& b,///<[in]     s.a.
101               bool& fail      ///<[in,out] s.a.
102              );
103
104/// compute the extended GCD d=s*a+t*b, fail is set to true if a zero divisor is
105/// encountered
106void tryNTLXGCD(zz_pEX& d,      ///<[in,out] GCD of a and b
107                zz_pEX& s,      ///<[in,out] s. a.
108                zz_pEX& t,      ///<[in,out] s. a.
109                const zz_pEX& a,///<[in]     s. a.
110                const zz_pEX& b,///<[in]     s. a.
111                bool& fail      ///<[in,out] s. a.
112               );
113#endif
114
115#endif
Note: See TracBrowser for help on using the repository browser.