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