source: git/factory/facNTLzzpEXGCD.h @ 08a955

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