source: git/ntl/doc/tour-changes.html @ 26e030

spielwiese
Last change on this file since 26e030 was 26e030, checked in by Hans Schönemann <hannes@…>, 15 years ago
*hannes: update to 5.5.1 git-svn-id: file:///usr/local/Singular/svn/trunk@11949 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 34.3 KB
Line 
1<html>
2<head>
3<title>
4A Tour of NTL: Summary of Changes  </title>
5</head>
6
7<body bgcolor="#fff9e6">
8<center>
9<a href="tour-roadmap.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a>
10 <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> 
11<a href="tour-ack.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a>
12</center>
13
14<h1> 
15<p align=center>
16A Tour of NTL: Summary of Changes
17</p>
18</h1>
19
20<p> <hr> <p>
21<h3>
222009.05.05: Changes between NTL 5.5 and 5.5.1
23</h3>
24
25<ul>
26<li> If using GMP (via either <tt>NTL_GMP_LIP</tt>
27or <tt>NTL_GMP_HACK</tt>), then the new version (4.3.0) of
28GMP implements the <tt>XGCD</tt> functionality differently,
29so that the coefficients do not always agree with those returned by
30the classical extended Euclidean algorithm.
31This version of NTL corrects the coefficients, so that the
32"classical" coefficients are always produced, regardless
33of GMP's implementation.
34This version of NTL also works
35around a bug in GMP 4.3.0's <tt>XGCD</tt> code
36(although that bug should be fixed in GMP 4.3.1).
37
38<li>
39The <tt>configure</tt> script has been slightly modified:
40there is a new configuration variable <tt>DEF_PREFIX</tt>,
41whose value can be used to set <tt>PREFIX</tt>, <tt>GMP_PREFIX</tt>,
42and <tt>GF2X_PREFIX</tt> in one stroke.
43Also, the (somewhat esoteric) <tt>configure</tt> variables
44<tt>GMP_LIBDIR</tt>, <tt>GMP_INCDIR</tt>,
45<tt>GF2X_LIBDIR</tt>, and <tt>GF2X_INCDIR</tt>
46have slightly different meanings now.
47
48</ul>
49</h3>
50
51<p> <hr> <p>
52<h3>
532009.04.08: Changes between NTL 5.4.2 and 5.5
54</h3>
55
56<ul>
57<li>
58Added the ability to generate a <i>shared</i> library
59(with help from Tim Abbott). <a href="tour-unix.html#shared">Details.</a>
60
61<li>
62Fixed some standardization issues
63(with help from Tim Abbot):
64default location of installed documentation files now conforms
65to standards; use of <tt>EOF</tt> now conforms to standards.
66
67<li>
68Added a callback mechanism to NTL's error reporting function.
69See <tt>ErrorCallback</tt> in <a href="tools.txt">tools.txt</a>.
70
71<li>
72Added support for the <tt>gf2x</tt> library for speeding up
73arithmetic in <tt>GF2X</tt> (with help from Emmanuel Thom&eacute;).
74<a href="tour-gf2x.html">Details.</a>
75
76<li>
77In conjuction with the above, I also changed the
78<tt>GF2X</tt> so that it works better with very large polynomials:
79large blocks of memory are released, recursive HalfGCD algorithms
80are used for large polynomials.
81
82
83<li>
84Fixed a bug in <tt>void TraceMod(zz_p&amp; x, const zz_pX&amp; a, const zz_pXModulus&amp; F)</tt> (reported by Luca De Feo).
85
86<li>
87Fixed a performance issue in various versions of <tt>SetCoeff</tt>
88(reported by Luca De Feo).
89
90<li>
91Fixed the declaration of  <tt>mat_zz_p transpose(const mat_zz_p&amp; a)</tt>
92(reported by Benoit Lacelle).
93</ul>
94
95
96<p> <hr> <p>
97<h3>
982008.03.05: Changes between NTL 5.4.1 and 5.4.2
99</h3>
100
101<ul>
102<li>
103Fixed a bug in the <tt>sub(ZZ_pEX, ZZ_pE, ZZ_pEX)</tt>
104and  <tt>sub(zz_pEX, zz_pE, zz_pEX)</tt> routines (reported by Charanjit Jutla).
105Under certain circumstances, these could outout wrong answers.
106
107</ul>
108
109<p> <hr> <p>
110<h3>
1112007.05.09: Changes between NTL 5.4 and 5.4.1
112</h3>
113
114<ul>
115<li>
116Fixed rounding bug in <tt>expm1</tt> (reported by Paul Zimmermann).
117
118<li>
119Fixed memory leak in several LLL routines (reported by Friedrich Bahr).
120
121<li>
122Fixed infinite loop in several LLL routines
123(this only occurred on machines, like x86, with double rounding).
124
125<li>
126Improved <tt>GF2X</tt> timing tests (suggested by Paul Zimmermann).
127
128</ul>
129
130<p> <hr> <p>
131<h3>
1322005.03.24: Changes between NTL 5.3.2 and 5.4 
133</h3>
134
135<ul>
136<li>
137By default, NTL now compiles in ISO mode (using namespaces, etc.).
138You can always revert to traditional mode by unsetting
139the flag <tt>NTL_STD_CXX</tt> 
140(either pass <tt>NTL_STD_CXX=off</tt> to the configure script,
141or manually edit the <tt>config.h</tt> file).
142<p>
143
144<li>
145Some bug fixes:
146
147<ul>
148<li>
149The <tt>sqrt</tt> and <tt>log1p</tt> routines
150for the <tt>RR</tt> class would produce incorrectly rounded
151results in certain circumstances (although this only affected the relative
152error of the result very marginally).
153<li>
154The <tt>SqrRootPrec</tt> routine for the <tt>RR</tt> class
155could not be called, because it was defined incorrectly.
156</ul>
157
158<p>
159
160Thanks to Paul Zimmermann for finding (and fixing) these bugs!
161Paul has also validated NTL's <tt>RR</tt> class by cross-checking it with the
162<a href="http://www.mpfr.org">MPFR</a> library.
163
164<p>
165<li>
166Some performance enhancements:
167
168<ul>
169<li>
170Added a new <tt>MulModPrecon</tt> inline function for
171computing <tt>(a * b) % n</tt> for single precision numbers,
172when <tt>b</tt> and <tt>n</tt> are fixed for several computations.
173On some platforms this can be twice as fast or more than the
174old <tt>MulMod2</tt> routine.
175This indirectly affects a lot of computations that are done via
176homomorphic imaging (polynomial multiplication
177over <tt>zz_p</tt>, <tt>ZZ_p</tt>, and <tt>ZZ</tt>,
178matrix computations over <tt>zz_p</tt> and <tt>ZZ</tt>).
179
180<li>
181Rewrote the small prime FFT to take advantage of the new
182<tt>MulModPrecon</tt>, and to be more cache friendly.
183
184<li>
185Improved the performance of the <tt>GF2X</tt> multiplication routine.
186On some platforms, it can be twice as fast as the old one.
187Thanks (again) to Paul Zimmermann for suggesting some of these
188improvements and supplying some of the code.
189
190</ul>
191
192<p>
193<li>
194Miscellany:
195
196<ul>
197<li>
198Rewrote several of the installation scripts in Perl (the old shell
199scripts were getting too messy to maintain).
200However, the syntax for all of the command-line interfaces
201remains identical.
202
203</ul>
204 
205
206
207
208
209</ul>
210
211<p> <hr> <p>
212<h3>
2132004.05.21: Changes between NTL 5.3.1 and 5.3.2
214</h3>
215
216<ul>
217<li>
218Some bug fixes.
219
220<p>
221<li>
222Re-wrote <tt>SqrRootMod</tt> to make it run faster.
223
224</ul>
225
226
227
228<p> <hr> <p>
229<h3>
2302002.12.17: Changes between NTL 5.3 and 5.3.1
231</h3>
232
233<ul>
234<li>
235Fixed a bug affecting the <tt>BuildIrred</tt> routines
236for <tt>ZZ_pEX</tt> and <tt>zz_pEX</tt>.
237</ul>
238
239<p> <hr> <p>
240<h3>
2412002.07.05: Changes between NTL 5.2 and 5.3
242</h3>
243
244<ul>
245<li>
246Minimized and isolated constructs that do not adhere to <tt>C</tt>/<tt>C++</tt> 
247standards,
248and added flags <tt>NTL_CLEAN_INT</tt> and <tt>NTL_CLEAN_PTR</tt>
249which force stricter compliance with these standards
250<a href="tour-impl.html">[more details]</a>.
251
252<p>
253<li>
254Added functions <tt>IsWhiteSpace</tt>, <tt>CharToIntVal</tt>,
255and <tt>IntValToChar</tt>  to the <tt>tools</tt> module
256<a href="tools.txt">[more details]</a>.
257
258<p>
259<li>
260Added methods <tt>allocated</tt>, <tt>position1</tt> to generic vector classes
261<a href="vector.txt">[more details]</a>.
262
263<p>
264<li>
265Added method <tt>allocated</tt> to the class <tt>vec_GF2</tt>
266<a href="vec_GF2.txt">[more details]</a>.
267
268<p>
269<li>
270Added conversion routines from unsigned int/long to int, long, float, and double
271<a href="conversions.txt">[more details]</a>.
272
273<p>
274<li>
275Added routines <tt>AddPrec</tt>, <tt>SubPrec</tt>, etc., to the <tt>RR</tt>
276module, and declared the practice of directly  assigning to the variable
277<tt>RR::prec</tt> obsolete
278<a href="RR.txt">[more details]</a>.
279
280<p>
281<li>
282Fixed a number of minor bugs.
283
284</ul>
285
286
287
288<p> <hr> <p>
289<h3>
2902001.07.19: Changes between NTL 5.1a and 5.2
291</h3>
292
293<p>
294
295<ul>
296<li>
297Implemented Mark van Hoeij's new algorithm for factorining polynomials
298with rational coefficients.
299This new algorithm is much more efficient than the previous algorithm
300used by NTL, and is the default (one can switch back to the old algorithm
301with a run-time switch).
302<p>
303<a href="ZZXFactoring.txt">[documentation]</a>
304<p>
305<a href="tour-time.html">[performance measurements]</a>
306<p>
307
308<li>
309Added routines <tt>LLL_plus</tt> that are just like the all-integer
310<tt>LLL</tt> routines, except that they return the exact values of the
311squared lengths of the Gramm-Schmidt basis vectors.
312This is useful in implementing van Hoeij's algorithm.
313<a href="LLL.txt">[more details]</a>.
314<p>
315
316<li>
317Made a small change to <tt>quad_float.c</tt> to make it compile
318under  gcc version 3.0
319without errors.
320This is the <i>one</i> place in NTL where I resort to just a little
321assmebly code (but only on x86/Linux platforms), and wouldn't you know it,
322this is the <i>one</i> place where gcc 3.0 had problems.
323<p>
324
325<li>
326Made a small change to the procedure for generating a distribution,
327so that now all files in the "tar" file comprising the distribution
328come without any annoyingly excessive access control restrictions.
329<p>
330
331<li>
332Changed the version numbering scheme so that it is now closer to
333"standard practice".
334This is version "5.2".
335Any small bug fixes to this version will be named "5.2.1", "5.2.2", etc.
336Also, macros are now defined so that the numerical components
337of the version number are available to the programmer.
338<a href="version.txt">[more details]</a>.
339
340
341</ul>
342
343
344<p> <hr> <p>
345<h3>
3462001.06.08: Changes between NTL 5.0c and 5.1a
347</h3>
348
349<p>
350Some minor fixes and additions.
351<p>
352Completely backward compatible.
353<p>
354
355<ul>
356
357<li>
358Added a routine <tt>LatticeSolve()</tt> for finding integer
359solutions to linear systems of integer equations.
360<a href="LLL.txt">[more details]</a>
361
362<p>
363<li>
364Modified the stragey used by the <tt>LLL()</tt> and <tt>image()</tt>
365routines in the <a href="LLL.txt">LLL package</a> to deal
366with linear dependencies.
367The new strategy guarantees better worst-case bounds on the
368sizes of intermediate values.
369I'm not sure if it will have any serious practical impact, though.
370
371<p>
372<li>
373Added some "partial ISO modes" so that one can use
374some of the features of Standard <tt>C++</tt>,
375even if ones compiler does not yet support all of the features.
376<a href="tour-stdcxx.html">[more details]</a>
377
378<p>
379<li>
380Bug fix: routine <tt>determnant()</tt> in <tt>mat_GF2.h</tt>
381was not visible to the linker because of a typo in <tt>mat_GF2.c</tt>.
382
383<p>
384<li>
385Made a "smarter" script for selecting the <tt>GetTime()</tt>
386function.
387This fixes an installation problem on Cygwin/Windows 95 platforms.
388I hope it doesn't create more problems than it solves, though.
389
390<p>
391<li>
392Added some extra documentation for installation under
393Windows/MS Visual <tt>C++</tt>.
394<a href="tour-win.html">[more details]</a>
395
396<p>
397<li>
398Changed some names like <tt>c_lip.c</tt> to <tt>c_lip_impl.h</tt>.
399This should avoid some potential installation problems.
400
401<p>
402<li>
403Throw away first 256-bytes of arc4 streams to improve quality of
404the pseudo-random number generator.
405This may change the precise behavior of some  programs.
406
407<p>
408<li>
409Other minor, internal modifications.
410
411</ul>
412
413
414
415
416<p> <hr> <p>
417<h3>
4182001.02.19: Changes between NTL 5.0b and 5.0c
419</h3>
420
421<p>
422Fixed a naming problem in the Windows distribution.
423The Unix distribution is unaffected.
424
425
426<p> <hr> <p>
427<h3>
4282001.02.19: Changes between NTL 5.0a and 5.0b
429</h3>
430
431<p>
432Fixed a typo in <tt>vec_ulong.c</tt> that causes a compile error
433on some platforms.
434
435
436<p> <hr> <p>
437<h3>
4382001.02.19: Changes between NTL 4.3a and 5.0a
439</h3>
440
441<p>
442<ul>
443<li>
444I've now re-structured NTL so that one can use
445either 'traditional' LIP or GMP as the <i>primary</i> long integer package.
446Doing this introduced some (minor) backward incompatabilies in
447the programming interface, so there is also a 'third way' -- you
448can use GMP as a <i>supplemental</i> long integer package (as in NTL 4.3),
449getting
450many (but not all) of the performance benefits of GMP, while
451maintaining <i>complete</i> backward compatability with the traditional
452long integer package.
453This 'third way' is not highly recommended -- it is only intended
454as a backward compatabilty hack.
455
456<p>
457Even if you do not use GMP, you should
458<a href="tour-gmp.html">read about using NTL with GMP</a> so
459that you can write code that works with either the traditional or GMP
460long integer packages.
461<p>
462<li>
463Added a <tt>ZZ</tt> to unsigned long conversion routine.
464<a href="conversions.txt">[more details]</a>
465<li>
466Added new vector classes <tt>vec_ulong</tt> (vectors
467of unsigned longs) and <tt>vec_vec_ulong</tt>.
468<a href="tour-modules.html">[more details]</a>
469<li>
470Some minor bug fixes:  under some unusual circumstances, a memory
471allocation error could be erroneously raised; I also added a patch
472that works around a bug in v3.0.1 of GMP.
473<li>
474Some internal cleansing, minimizing the use of non-standard constructs.
475</ul>
476
477
478<p> <hr> <p>
479<h3>
480Changes between NTL 4.2a and 4.3a
481</h3>
482
483This is backward compatible with previous versions.
484
485<p>
486<ul>
487<li>
488Improved the performance of <tt>ZZ_pX</tt> arithmetic when using
489GMP.
490The GMP version is also more space efficient
491(the pre-computed tables are much smaller).
492These improvements are most marked for very large <tt>p</tt> (several
493thousand bits).
494
495<p>
496The only thing unsatisfactory about this state of affairs is that
497<i>vis a vis</i> the GMP version, the pure
498LIP code is asymptotically slower by <i>more</i> than a constant factor,
499and is is also less space efficient.
500Perhaps I'll get around to rectifying this imbalance someday.
501To do this, I need a sub-quadratic division with remainder routine for LIP.
502At any rate, the differences only become seriously noticible when
503<tt>p</tt> has more than a few thousand bits.
504
505<p>
506
507<li>
508Some other small adjustments here and there.
509
510</ul>
511
512<p> <hr> <p>
513<h3>
514Changes between NTL 4.1a and 4.2a
515</h3>
516
517This is backward compatible with previous versions.
518
519<p>
520<ul>
521<li>
522Hacked the big integer code so that NTL uses GMP
523(the GNU Multi-Precision library).
524This is done in such a way as to get most of the benefits of GMP
525with a reasonable amount of effort, and while maintaining complete backward
526compatability and minimizing the risk of introducing bugs.
527Some arithmetic operations
528on some platforms may execute two to three times
529faster if using GMP. <a href="tour-gmp.html">[more details]</a>
530<li>
531Simplified the installation procedure on Unix systems by
532providing a simple configuration script so that setting
533various configuration variables can be done without
534editing the <tt>makefile</tt> and  <tt>config.h</tt> file.
535<a href="tour-unix.html">[more details]</a>
536<li>
537Added function <tt>GenGermainPrime</tt>
538to efficiently generate random Germain primes, i.e., primes <i>p</i>
539such that <i>2p+1</i> is also prime. <a href="ZZ.txt">[more details]</a>
540<li>
541Added a function <tt>random</tt> to generate random <tt>quad_floats</tt>.
542<a href="quad_float.txt">[more details]</a>
543<li>
544Added an <tt>ifdef</tt> in <tt>tools.h</tt> that allows
545one to suppress the declaration of <tt>min</tt> and <tt>max</tt>
546functions in NTL client programs;
547these were causing problems when writing 'Windows applications'.
548<li>
549Implemented a faster algorithm for initializing the
550<tt>ZZ_p</tt> auxilliary data structures.
551<li>
552Polished up a few other minor things in the code and documentation.
553</ul>
554
555<p> <hr> <p>
556
557<p>
558<h3>
559Changes between NTL 4.0a and 4.1a
560</h3>
561<p>
562
563This is backward compatible with previous versions.
564
565<p>
566<ul>
567<li>
568Made some changes that should make NTL compile smoothly
569using any variation of the <tt>C++</tt> language between traditional and
570ISO Standard.
571These changes do not affect the documented NTL interface or the
572behaviour of NTL.
573
574<li>
575Added a flag <tt>NTL_STD_CXX</tt> in the <tt>config.h</tt> file.
576Setting this flag causes all of NTL to be "wrapped" in namespace <tt>NTL</tt>,
577and that part of the standard library used by NTL is "wrapped"
578in namespace <tt>std</tt>.
579This should greatly help with the <i>namespace pollution</i> problem.
580<a href="tour-stdcxx.html">Go here</a> for more details.
581
582</ul>
583
584
585
586<p> <hr> <p>
587
588<p>
589<h3>
590Changes between NTL 3.9b and 4.0a
591</h3>
592<p>
593
594This is backward compatible with previous version.
595
596<p>
597<ul>
598<li>
599Attached the GNU General Public License to NTL.
600
601<li>
602Fixed two bugs:
603<ul>
604<li>
605one in <tt>ReconstructRational</tt> which resulted in a crash on some inputs;
606<li>
607one in <tt>exp(RR)</tt> (and by implication in <tt>pow(RR,RR)</tt>),
608which led to wrong answers on 64-bit machines when computing <tt>exp(x)</tt>
609for <tt>x > 2^53</tt>.
610</ul>
611
612<li>
613Increased some inconvenient limiting bounds, including a restriction on the
614FFT.
615
616</ul>
617
618
619<p> <hr> <p>
620
621<p>
622<h3>
623Changes between NTL 3.9a and 3.9b
624</h3>
625<p>
626
627This is a minor revision of 3.9a.
628
629<ul>
630<li>
631Improved time and space efficiency of the HNF routine
632(see <a href="HNF.txt"><tt>HNF.txt</tt></a>).
633The old version was based on the description in Henri Cohen's book,
634which was not really properly optimized.
635</ul>
636
637
638
639<p> <hr> <p>
640
641<p>
642<h3>
643Changes between NTL 3.8b and 3.9a
644</h3>
645<p>
646
647This is backward compatible with previous versions.
648
649<ul>
650<li>
651Modified the installation script somewhat, adding
652a <i>configuration wizard</i> that sets the flags in
653<tt>config.h</tt> "automagically".
654This works for the <a href="tour-unix.html">Unix version</a> only.
655
656<li>
657Improved the <tt>xdouble</tt> input/output and ascii to <tt>xdouble</tt>
658conversion.
659The old version could be a bit flaky when reading/writing
660very large numbers.
661The new I/O routines also attain better accuracy.
662
663<li>
664Improved conversion routines between <tt>xdouble</tt>
665and <tt>ZZ</tt>/<tt>RR</tt>.
666
667<li>
668Improved the <tt>RR</tt> output routine.
669The new version should be more accurate and also
670completely platform independent.
671
672<li>
673Added the following routines to the <tt>RR</tt> package:
674<pre>
675   {Trunc,Floor,Ceil,Round}ToZZ, round
676   RoundToPrecision, MakeRR
677   random
678</pre>
679See <a href="RR.txt"><tt>RR.txt</tt></a> for details.
680
681<li>
682Improved the accuracy of <tt>quad_float</tt> input/output,
683and the accuracy of conversion between <tt>quad_float</tt> and <tt>RR</tt>.
684
685<li>
686Made the timing function somewhat more robust.
687
688<li>
689Hacked the Unix installation script so that it works
690more smoothly with Cygnus tools under Windows.
691
692<li>
693Fixed a few other, small problems.
694</ul>
695
696<p> <hr> <p>
697
698<p>
699<h3>
700Changes between NTL 3.8a and 3.8b
701</h3>
702<p>
703
704This is a minor revision of 3.8a.
705
706<ul>
707<li>
708Fixed a bug, a memory leak in routine <tt>gauss</tt> for <tt>mat_ZZ_pE</tt>
709and <tt>mat_zz_pE</tt>.
710<li>
711Fixed a minor problem in <tt>config.h</tt>.
712<li>
713Tightened up some size checks, so that now some nice "size invariants"
714are guaranteed, e.g., for a <tt>ZZ</tt> <tt>n</tt>,
715<pre>
716   NumBits(NumBits(n)) &lt;= NTL_BITS_PER_LONG-4
717</pre>
718Similarly for the type <tt>GF2X</tt>.
719Of course, on most platforms, one will run out of memory before
720these bounds are exceeded, but they are nevertheless convenient.
721</ul>
722
723
724<p> <hr> <p>
725
726<p>
727<h3>
728Changes between NTL 3.7a and 3.8a
729</h3>
730<p>
731
732This is backward compatible with previous versions.
733
734
735<ul>
736<li>
737Added conversion routines from <tt>unsigned</tt> <tt>int</tt>
738and <tt>unsigned</tt> <tt>long</tt> to
739<tt>ZZ</tt>, <tt>RR</tt>, <tt>xdouble</tt>, and <tt>quad_float</tt>.
740
741<li>
742Added routines <tt>GF2XFromBytes</tt> and <tt>BytesFromGF2X</tt>
743for conversion between byte vectors and polynomials over <tt>GF(2)</tt>,
744along with routines <tt>NumBits</tt> and <tt>NumBytes</tt>
745for such polynomials.
746See <a href="GF2X.txt"><tt>GF2X.txt</tt></a> for details.
747
748<li>
749Added a hack in the <tt>ZZX</tt> factorizer
750to exploit polynomials of the form <tt>g(x^k)</tt>.
751This can be disabled by setting the variable <tt>ZZXFac_PowerHack</tt>
752to zero.
753See <a href="ZZXFactoring.txt"><tt>ZZXFactoring.txt</tt></a>
754for details.
755
756<li>
757Improved the hensel system solver <tt>solve1</tt>.
758See <a href="mat_ZZ.txt"><tt>mat_ZZ.txt</tt></a> for details.
759
760<li>
761Changed documentation for <tt>RationalReconstruction</tt>
762to reflect the Wang, Guy, Davenport bounds.
763See <a href="ZZ.txt"><tt>ZZ.txt</tt></a> for details.
764
765<li>
766Improved the routine <tt>GenPrime</tt> a bit.
767
768<li>
769Some other small tweaks here and there.
770No real bug fixes.
771
772<li>
773Polished the documentation a bit, adding more examples.
774
775</ul>
776
777<p> <hr> <p>
778
779<p>
780<h3>
781Changes between NTL 3.6b and 3.7a
782</h3>
783<p>
784
785This is backward compatible with previous versions.
786
787<ul>
788<li>
789Added a "rational reconstruction" routine.
790See the routine <tt>ReconstructRational</tt> in <a href="ZZ.txt">ZZ.txt</a>.
791<li>
792Added another routine for solving linear systems over <tt>ZZ</tt>
793that is based on Hensel lifting, rather than Chinese Remaindering.
794It can be significantly faster in some cases.
795See the routine <tt>solve1</tt> in <a href="mat_ZZ.txt">mat_ZZ.txt</a>).
796<li>
797Some performace tuning, especially CRT and polynomial interpolation code.
798<li>
799Various documentation corrections.
800<li>
801Added more "overflow checks" here and there to ensure programs crash gracefully
802when certain things get too big.
803<li>
804Fixed a "benign" bug (i.e., it would never get triggered on any of today's
805machines).
806<li>
807Removed references to <tt>&lt;malloc.h&gt;</tt>, which were unnecessary,
808non-standard, and caused problems on some platforms.
809</ul>
810
811<p>
812<hr>
813
814<p>
815<h3>
816Changes between NTL 3.6a and 3.6b
817</h3>
818<p>
819
820Bug fixes.
821
822<p>
823<hr>
824
825<p>
826<h3>
827Changes between NTL 3.5a and 3.6a
828</h3>
829<p>
830
831This version is backward compatible with 3.5a.
832
833<p>
834
835<ul>
836
837<li>
838A few small bug fixes and performance enhancements.
839
840<li>
841Changes to the <tt>ZZX</tt> factoring routines that in some
842cases yield dramatic performance improvements
843(<a href="tour-time.html">more details</a>).
844
845</ul>
846
847<p>
848<hr>
849
850
851<p>
852<h3>
853Changes between NTL 3.1b and 3.5a
854</h3>
855<p>
856
857<b>Please note.</b> This version is <b>NOT</b> completely backward compatible.
858
859<p>
860
861Summary of changes:
862
863<ul>
864
865<li>
866Improved performance of the "all integer" LLL routine.
867
868<li>
869Put in a better pseudo-random number generator,
870and added ZZ/byte array conversions.
871
872<li>
873Improved performance of primality test, and added a
874more convenient routine <tt>GenPrime</tt>.
875
876<li>
877Overloaded NTL's vector placement "new" operator in a different
878way to avoid conflicts with standard <tt>C++</tt> library.
879
880<li>
881Renamed many macros.
882
883<li>
884Renamed header files.
885
886<li>
887Made some changes to the packaging
888the installation procedure.
889
890</ul>
891
892<p>
893<b>Renamed Macros.</b>
894I renamed many macros defined in NTL header files.
895
896<p>
897The reason is that I want to minimize namespace pollution.
898Someday, NTL will be wrapped in a namespace, and when that happens
899the only remaining namespace pollution problems will be caused by macros.
900Eliminating all macros from NTL is not feasible.
901Instead, all NTL defined macros now begin with the prefix "NTL_",
902which reduces the namespace pollution to an ecceptable level.
903You will probably not be affected by this, unless you
904do some low level hacking using a macro like <tt>ZZ_NBITS</tt>
905(now called <tt>NTL_NBITS</tt>), or unless you create your
906own NTL vectors using a macro like <tt>ntl_vector_decl</tt>
907(now called <tt>NTL_vector_decl</tt>).
908
909<p>
910For a complete list of affected names, see <a href="names.txt">names.txt</a>.
911
912<p>
913Adapting to this name change should be painless, as there is a
914program to translate source files from the old naming convention to the new.
915The file "newnames.c",
916can be compiled as either a <tt>C</tt> or <tt>C++</tt>
917program.
918The program is a "filter" that copies its input to its output,
919replacing all the old macro names by the new macro names.
920<p>
921In the WinNTL distribibution, "newnames.c" is called
922"newnames.cpp" and is located in the directory
923"newnames".
924
925
926<p>
927<b>Renamed header files.</b>
928The names of header files themeselves pollute another (extra-linguitsic) namespace.
929To alleviate this problem, the header files have been renamed.
930Instead of
931<pre>
932   #include "foo.h"
933</pre>
934one now should write
935<pre>
936   #include &lt;NTL/foo.h&gt;
937</pre>
938The only exceptions are the old header files "ntl_vector.h",
939"ntl_matrix.h", and "ntl_pair.h", which are now called
940<tt>&lt;NTL/vector.h&gt;</tt>, <tt>&lt;NTL/matrix.h&gt;</tt>, and
941<tt>&lt;NTL/pair.h&gt;</tt>.
942
943<p>
944<b>Installation procedure.</b>
945Now all
946NTL flags like NTL_LONG_LONG, NTL_AVOID_FLOAT, etc., can  now be set
947by editing the special file "include/NTL/config.h".
948See details in that file.
949The reason for this change is that this allows all of these settings
950to be made when NTL is configured and built.
951Clients of NTL will then automatically use consistent settings.
952One should not set these flags on the compiler command line as previously.
953
954
955<p>
956Pentium/Linux people should no longer have to worry
957about the NTL_X86_FIX flag. NTL now psychically deduces
958the "right thing to do", although if its psychic abilities fail,
959you can override it with flags in "include/NTL/config.h".
960
961<p>
962The "packaging" in the Unix distribution is slightly
963different, but hopefully nicer.
964Among other things, the tar file now unpacks into a sub-directory of the current directory.
965See <a href="tour-unix.html">the unix installation section</a>
966for more details.
967The Windows zip file now also
968unpacks into  sub-directory.
969
970
971<p>
972<b>My apologies.</b>
973Although these changes are minor, they will cause some NTL
974users some inconvenience.
975I apologize for this.
976I really, really hope there are no more changes like this
977(see my <a href="tour-roadmap.html">roadmap</a> of NTL's future).
978
979<p>
980<hr>
981
982
983<p>
984<h3>
985Changes between NTL 3.1a and 3.1b
986</h3>
987<p>
988
989Defined functions <tt>div(GF2X,GF2X,GF2)</tt> and <tt>div(GF2X,GF2X,long)</tt>,
990which had not been defined in earlier versions.
991Affected file: <tt>GF2X.c</tt>.
992Most programs never use this, and most linkers do not complain
993if these are missing (but some do).
994
995<p>
996<hr>
997
998<p>
999<h3>
1000Changes between NTL 3.0f and 3.1a
1001</h3>
1002<p>
1003
1004This version is backward compatible with previous versions.
1005
1006<p>
1007
1008<ul>
1009<li>
1010Added floating point LLL routines based on Givens rotations,
1011instead of classical Gramm-Schmidt orthogonalization.
1012This is a more stable, but somewhat slower, method.
1013See <a href="LLL.txt">LLL.txt</a> for details.
1014
1015<li>
1016Added support for irreducible trinomials and pentanomials
1017over GF(2). The <tt>GF2XModulus</tt> routines,
1018and by extension, the <tt>GF2E</tt> routines,
1019now exploit moduli of this special form.
1020The new routine <tt>BuildSparseIrred</tt> in <tt>GF2XFactoring</tt>
1021builds irreducibles of this form.
1022
1023<li>
1024Also implemented a faster modular inversion routine
1025for <tt>GF2X</tt>, and improved the performance of <tt>ZZ_pX</tt>
1026multiplication for small degree polynomials.
1027</ul>
1028
1029<p>
1030<hr>
1031
1032<p>
1033<h3>
1034Changes between NTL 3.0e and 3.0f
1035</h3>
1036<p>
1037
1038<ul>
1039<li>
1040Fixed a bug (another one) affecting routines
1041<pre>
1042   RandomBits, RandomBits_ZZ
1043</pre>
1044in module <tt>ZZ</tt>.
1045Affected source file: <tt>lip.c</tt>.
1046
1047<li>
1048Bug fix and performance tweak in <tt>ZZX</tt> factorizer.
1049Affected source file: <tt>ZZXFactoring.c</tt>.
1050   
1051</ul>
1052
1053<p>
1054<hr>
1055
1056<p>
1057<h3>
1058Changes between NTL 3.0 and 3.0e
1059</h3>
1060<p>
1061
1062<ul>
1063<li>
1064Fixed a bug affecting routines
1065<pre>
1066   RandomBits, RandomBits_ZZ, RandomBits_long
1067</pre>
1068in module <tt>ZZ</tt>.
1069The only source files that are affected and require re-compilation are
1070<pre>
1071   ZZ.c, lip.c
1072</pre>
1073
1074<li>
1075Note about names:
10763.0a-c were "pre-releases", which makes the "first release" 3.0d,
1077and hence this bug fix 3.0e.
1078   
1079</ul>
1080
1081<p>
1082<hr>
1083
1084
1085<p>
1086
1087<h3>
1088Changes between NTL 2.0 and 3.0
1089</h3>
1090<p>
1091
1092
1093<ul>
1094
1095<li>
1096Added functionality:
1097<p>
1098
1099<ul>
1100
1101<li>
1102Added classes vec_GF2 and mat_GF2 for fast linear algebra over GF(2).
1103
1104<li>
1105Added classes ZZ_pE, ZZ_pEX, zz_pE, zz_pEX, supporting polynomial
1106arithmetic over extension rings/fields over prime fields.
1107
1108<li>
1109Added John Abbott's pruning heuristic to the ZZX factoring routine.
1110
1111<li>
1112Speeded up multiplication in zz_pX for small p (this also helps
1113the ZZX factoring routine).
1114
1115<li>
1116Added some some transcendental functions (e.g., exp, log, pi) to RR.
1117
1118<li>
1119Added verbose mode and pruning to the XD and RR variants of LLL.
1120
1121</ul>
1122<p>
1123
1124<li>
1125Improved programming interface:
1126with this version, I've taken an the opportunity to
1127give the programming interface a "professional facelift".
1128In previous releases, I've tried to maintain backward compatability
1129as much as possible, but to make the badly needed improvements
1130to the interface that I've made with this release, this was not
1131possible.
1132<p>
1133NTL 3.0 is not backward compatable with NTL 2.0.
1134<p>
1135I apologize to NTL users for this, but it is a bit of painful
1136medicine that should only be necessary to take just this one time
1137(but then as a <tt>C++</tt> programmer, you must already
1138be used to suffering ;-).
1139Just about all of the incompatabilities are detectable by the compiler.
1140See below for a detailed list of the changes and
1141some tips on making the transition.
1142<p>
1143The new interface is much more enjoyable to work with,
1144and I don't foresee any changes to the interace in the future.
1145Here is a broad overview of the changes:
1146<p>
1147
1148<ul>
1149<li>
1150Added functional/operator notation consistently throughout NTL,
1151making it possible to write much more concise and readable code.
1152<li>
1153Got rid of automatic type conversions:  these cause just too
1154many problems.  But I've overloaded all of the basic arithmetic
1155operators and procedures so as to emulate a natural kind
1156of "type promotion" logic.  With these promotions, along with
1157a  full compliment of conversion functions, one hardly misses
1158the automatic conversions.
1159<li>
1160Got rid of the macros
1161<pre>
1162   vector(T), matrix(T), pair(T),
1163</pre>
1164which were causing too many name space problems.
1165
1166<li>
1167Made assignment operators have the "correct" return type.
1168<li>
1169Introduced a more powerful and flexible mechanism for modulus changing.
1170<li>
1171Cleaned up numerous other minor problems.
1172</ul>
1173
1174</ul>
1175
1176<p>
1177<h4>
1178Compatibility
1179</h4>
1180<p>
1181
1182Here is a detailed list of the changes to the programming
1183interface.
1184<p>
1185
1186
1187<ul>
1188
1189<li>
1190The names of the classes
1191<pre>
1192   BB, BB_p, BB_pX
1193</pre>
1194have been changed to
1195<pre>
1196   GF2X, GF2E, GF2EX
1197</pre>
1198
1199<li>
1200There is also a class <tt>GF2</tt> to represent GF(2).
1201Many of the functions relating to <tt>BB, BB_p, BB_pX</tt>
1202had argument and return-value types of type <tt>long</tt>
1203that are now of the more appropriate type <tt>GF2</tt>.
1204This change was needed so that the interface would be consistent
1205with that of the new classes
1206<pre>
1207   ZZ_pE, ZZ_pEX, zz_pE, zz_pEX.
1208</pre>
1209
1210<li>
1211The explicit conversion operator from <tt>GF2X</tt> 
1212(the new <tt>BB</tt>) to <tt>GF2EX</tt> (the new <tt>BB_pX</tt>)
1213has different semantics: it now performs a coefficient lift,
1214instead of creating a constant polynomial.
1215
1216<li>
1217The conversion operator "<tt>&lt;&lt;</tt>" has been retired.
1218Now instead of
1219<pre>
1220   x &lt;&lt; a;
1221</pre>
1222one writes
1223<pre>
1224   conv(x, a);
1225</pre>
1226<p>
1227Operator "<tt>&lt;&lt;</tt>" is now used for shift operations.
1228<li>
1229Every conversion routine now has a corresponding functional version
1230which has the name <tt>to_T</tt>, where <tt>T</tt> is the result type.
1231These new names replace old names that were less consistent.
1232So instead of
1233<pre>
1234   x = Long(a);
1235</pre>
1236one writes
1237<pre>
1238   x = to_long(a);
1239</pre>
1240
1241
1242<li>
1243The names of the routines
1244<pre>
1245   ZZ_pInit, zz_pInit, zz_pFFTInit, GF2EInit
1246</pre>
1247have been changed to
1248<pre>
1249   zz_p::init, zz_p::init, zz_p::FFTInit, GF2E::init
1250</pre>
1251
1252<li>
1253The names of the routines
1254<pre>
1255   and, or, xor
1256</pre>
1257for class <tt>ZZ</tt> have
1258changed to
1259<pre>
1260   bit_and, bit_or, bit_xor,
1261</pre>
1262because the new <tt>C++</tt>
1263standard defines these as reserved words.
1264
1265<li>
1266The function <tt>LowBits</tt> for <tt>ZZ</tt> is now called <tt>trunc</tt>.
1267
1268<li>
1269Polynomial inversion mod <tt>X^n</tt> has changed from <tt>inv</tt>
1270to <tt>InvTrunc</tt>.
1271
1272<li>
1273Modular trace, norm, minimum polynomial and characteristic
1274polynomial have changed from
1275<pre>
1276   trace, norm, MinPoly, IrredPoly, CharPoly
1277</pre>
1278to
1279<pre>
1280   TraceMod, NormMod, MinPolyMod, IrredPolyMod, CharPolyMod
1281</pre>
1282
1283
1284<li>
1285For the class <tt>ZZX</tt>, the functions
1286<pre>
1287   DivRem, div, rem, /, %, /=, %=
1288</pre>
1289have new semantics when dividing by non-monic polynomials.
1290The old semantics are provided by new routines
1291<pre>
1292   PseudoDivRem, PseudoDiv, PseudoRem.
1293</pre>
1294
1295<li>
1296The <tt>UpdateMap</tt> routines have slightly different semantics:
1297in versions &lt; 3.0, the output always had length n;
1298now high-order zeroes are stripped.
1299
1300<li>
1301The classes <tt>ZZ_pBak</tt>, <tt>zz_pBak,</tt> etc., 
1302have just slightly different semantics;  I can't imagine
1303any reasonable program detecting a difference.
1304
1305<li>
1306The assignment operator and copy constructor for the class <tt>RR</tt>
1307have different semantics: they now produce exact copies, instead
1308of rounding to current precision.
1309
1310<li>
1311All of the NTL compiler flags now start with <tt>NTL_</tt>
1312to avoid name space problems.
1313
1314<li>
1315All of the files "zz_p.h", vec_zz_p.h", etc., have been eliminated.
1316Use instead the names "lzz_p.h", "vec_lzz_p.h", etc.
1317
1318</ul>
1319
1320<p>
1321<h4>
1322Tips on making the transition
1323</h4>
1324<p>
1325
1326<ul>
1327
1328<li>
1329Apply this <a href="sedscript.txt">sed script</a> to make
1330most of the necessary syntactic changes.
1331
1332<li>
1333Re-compile old NTL programs with the flag
1334<pre>
1335   -DNTL_TRANSITION
1336</pre>
1337See <a href="flags.txt">flags.txt</a> for details on how
1338this will help your compiler detect remaining incompatabilities.
1339In particular, any uses of operator <tt>&lt;&lt;</tt>
1340in its old role as a conversion operator will cause the compiler
1341to raise an error.
1342You can then convert all of these to the new notation.
1343
1344</ul>
1345
1346
1347<p>
1348<hr>
1349
1350
1351<p>
1352<h3>
1353Changes between NTL 1.7 and 2.0
1354</h3>
1355<p>
1356
1357<ul>
1358<li>
1359Implementation of classes BB (polynomials over GF(2))
1360and BB_pX (polynomials over GF(2^n)).
1361
1362<li>
1363A more consistent and natural interface, including arithmetic operators
1364and a disciplined use of automatic conversion.
1365So now one can write
1366<pre>
1367   x = a * b + c;
1368</pre>
1369instead of
1370<pre>
1371   mul(x, a, b);
1372   add(x, x, c);
1373</pre>
1374as one must in older versions of NTL.
1375The operator notation leads to somewhat less efficient code,
1376and one can always use the old notation in situations
1377where efficiency is critical.
1378Despite the new programming interface,
1379care has been taken to ensure backward compitability;
1380pre-existing programs that use NTL should still work.
1381
1382<li>
1383Windows port.
1384
1385<li>
1386Added compile-time flag that allows one to exploit
1387"long long" data type if it exists (this especially helps on Pentium/Linux
1388platforms).
1389
1390<li>
1391Added compile-time flag to get better quad_float code on
1392Pentium/Linux platforms.
1393
1394<li>
1395A few bug fixes and performance tuning.
1396</ul>
1397
1398<p>
1399<hr>
1400
1401
1402<p>
1403<h3>
1404Changes between NTL 1.5 and NTL 1.7
1405</h3>
1406<p>
1407
1408<ul>
1409<li>
1410Incorporation of Keith Briggs' quadratic precision package.
1411
1412<li>
1413Much faster and more robust lattice basis reduction,
1414including Schnorr-Horner "volume heuristic" for Block Korkin
1415Zolotarev reductions, and a new quadratic precision LLL variant
1416that is much more robust.
1417
1418<li>
1419A few bug fixes.
1420
1421</ul>
1422
1423
1424<p>
1425<hr>
1426
1427<p>
1428<h3>
1429Changes between NTL 1.0 and NTL 1.5
1430</h3>
1431<p>
1432
1433
1434<ul>
1435<li>
1436Implementation of Schnorr-Euchner algorithms for
1437lattice basis reduction, including deep insertions and
1438block Korkin Zolotarev reduction.
1439These are significantly faster than the LLL algorithm
1440in NTL 1.0.
1441
1442<li>
1443Implementation of arbitrary-precision floating point.
1444
1445<li>
1446Implementation of double precision with extended exponent range,
1447which is useful for lattice basis reduction when the coefficients
1448are large.
1449
1450<li>
1451Faster polynomial multiplication over the integers,
1452incorporating the Schoenhagge-Strassen method.
1453
1454<li>
1455Compilation flags that increase performance on machines
1456with poor floating-point performance.
1457
1458<li>
1459Sundry performance tuning and a few bug fixes.
1460
1461</ul>
1462
1463<center>
1464<a href="tour-roadmap.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a>
1465 <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> 
1466<a href="tour-ack.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a>
1467</center>
1468
1469</body>
1470</html>
Note: See TracBrowser for help on using the repository browser.