]> www.ginac.de Git - ginac.git/blob - NEWS
documentation update
[ginac.git] / NEWS
1 This file records noteworthy changes.
2
3 1.2.0 (<insert date>)
4 * Added a structure<T> template class for the easy creation of user-defined
5   algebraic classes.
6 * Added support for (acyclic) visitors, to allow cleaner implementations of
7   algebraic algorithms.
8 * Added a const_iterator class that can be used instead of op()/nops().
9 * Completely revamped the implementation of expression output. It is now
10   possible to add new output formats, to change the behavior of predefined
11   formats at run-time, and to have different output styles for algebraic
12   functions.
13 * Symbols can be made non-commutative.
14 * Added a method ex::conjugate() and a function conjugate() for complex
15   conjugation. Symbols can be declared as real or complex-valued.
16 * Improved the speed of subs(), normal(), to_rational() and to_polynomial()
17   by the use of maps instead of lists. The old forms
18     subs(const lst & ls, const lst & lr, unsigned options)
19     to_rational/to_polynomial(lst & repl)
20   are still available for compatibility, but using the new forms
21     subs(const exmap & m, unsigned options)
22     to_rational/to_polynomial(exmap & repl)
23   is more efficient, especially when the number of replacements is large.
24 * quo(), rem(), prem(), sprem(), decomp_rational(), unit(), content(),
25   primpart() and matrix::charpoly() now take a "const ex &" instead of a
26   "const symbol &".
27 * Redundant expressions (two ex pointing to different objects are found to be
28   equal in compare()) are now actively deleted/fused to conserve memory and
29   speed up subsequent comparisons. This behavior can be suppressed on a
30   per-object level with status_flags::not_shareable. Lists and matrices are
31   not shareable by default.
32 * Lots of internal streamlining and optimizations.
33 * Caveats for class implementors:
34    - basic::copy() and basic::destroy() are gone; classes derived from
35      basic can use the defaults for the assignment operator and copy
36      constructor.
37    - basic::subs(), basic::normal(), basic::to_rational() and
38      basic::to_polynomial() take 'exmap' objects instead of lists.
39    - basic::subs() now descends into subexpressions (if accessible via
40      nops()/op()/let_op()). If you have a custom implementation of subs()
41      that calls basic::subs() after substituting subexpressions, this needs
42      to be changed to a call to subs_one_level().
43    - lst::thislst() and exprseq::thisexprseq() renamed to thiscontainer().
44    - thiscontainer() and associated constructors now take a std::auto_ptr.
45    - Overloading basic::print() is now deprecated. You should use
46      print_func<>() class options instead.
47
48 1.1.7 (11 March 2004)
49 * Fixed a bug in canonicalize_clifford().
50 * Series expansion now works predictably. All terms with the exponent of the
51   expansion variable smaller than the given order are calculated exactly. If
52   the series is not terminating, the Order function is (at least) of the given
53   order.
54
55 1.1.6 (22 January 2004)
56 * Added a function option "dummy()" which means "no options". This simplifies
57   the implementation of symbolic functions which are not to be further
58   evaluated.
59 * Removed a bug in the numerical evaluation of Li() that caused the system
60   to hang for certain parameter combinations.
61 * Fixed a bug in the calculation of hash values for indices that could lead
62   to wrong results or bogus error messages from simplify_indexed().
63 * Fixed a bug in the evaluation of harmonic polylogarithms for complex
64   arguments with positive imaginary part.
65
66 1.1.5 (5 November 2003)
67 * Harmonic polylogarithms now numerically evaluate for arbitrary arguments
68   (parameter must still be positive integers).
69 * The zeta function now can also be given a lst as a parameter in which case
70   it becomes a multiple zeta value. The use of mZeta is deprecated.
71 * The order of parameters for the multiple polylogarithm has been corrected.
72 * Documentation for the nested sums functions zeta, harmonic polylog, multiple
73   polylog, etc. has been added.
74
75 1.1.4 (17 October 2003)
76 * Lists and matrices can now be initialized from comma-separated lists of
77   expressions, like this:
78
79     lst l;
80     l = x, 2, y, x+y;
81
82     matrix M(3, 3);
83     M = x, y, 0,
84        -y, x, 0,
85         0, 0, 1;
86
87   This is both faster and produces much smaller code than the old constructors
88   lst(ex, ex, ...) and matrix(unsigned, unsigned, lst), especially in the case
89   of matrices, and is now the recommended way to create these objects.
90 * The function mZeta now evaluates much faster for arbitrary parameters. The
91   harmonic and multiple polylogarithms evaluate considerably faster and check
92   for convergence. The order of parameters for the harmonic polylogarithm
93   has been corrected.
94
95 1.1.3 (22 August 2003)
96 * Added new symbolic functions for better integration with nestedsums:
97   (multiple) polylogarithm Li(), Nielsen's generalized polylogarithm S(),
98   harmonic polylogarithm H(), and multiple zeta value mZeta().
99 * New exhashmap<T> template intended as a drop-in replacement for
100   std::map<ex, T, ex_is_less> using GiNaC's hashing algorithms.
101
102 1.1.2 (11 August 2003)
103 * Fixed a bug in the unarchiving of sums and products: terms were not
104   reordered in a canonical way.
105 * Fixed a bug in normal()/numer_denom(): denominator was not made unit
106   normal if it was a simple number.
107 * Improved the speed of subs() in some cases.
108
109 1.1.1 (18 June 2003)
110 * lst (and exprseq) provide iterators for read-only element access. For
111   sequential access this is one order faster than using op().
112 * Implemented relational::subs() (this was done in 1.0.9 but inadvertently
113   omitted from the 1.1 branch).
114 * pole_error and do_taylor are available to library users.
115 * Added on-line help and Tab-completion for print(), iprint(), print_latex()
116   and print_csrc() in ginsh.
117
118 1.1.0 (3 April 2003)
119 * Removed deprecated macros is_ex_a, is_ex_exactly_a and friends for good.
120 * The scalar_products mechanism allows the specification of an index dimension.
121 * Removed dirac_gamma6/7().
122 * Added ex::to_polynomial().
123 * subs() accepts an optional "options" argument. The option
124   subs_option::subs_algebraic enables "smart" substitutions in products and
125   powers.
126 * Added stream manipulators "dflt", "latex", "python", "python_repr", "tree",
127   "csrc", "csrc_float", "csrc_double", "csrc_cl_N", "index_dimensions" and
128   "no_index_dimensions" to control the output format. Calling basic::print()
129   directly is now deprecated.
130 * Made the hashing more simple and efficient.
131 * Caveats for class implementors:
132    - basic::subs(): third argument changed from "bool" to "unsigned"
133    - unarchiving constructor and basic::unarchive(): "const" removed from
134      second argument
135    - basic::let_op() should only be implemented if write access to
136      subexpressions is desired
137    - simplify_ncmul() renamed to eval_ncmul()
138    - simplified_ncmul() renamed to hold_ncmul()
139    - nonsimplified_ncmul() renamed to reeval_ncmul()
140
141 1.0.14 (1 March 2003)
142 * Improved the C-source output: complex numbers are printed correctly (using
143   the STL complex<> template or cln::complex()), rational numbers use cl_RA()
144   in the CLN output, and small integers are printed in a more compact format
145   (e.g. "2.0" instead of "2.0000000e+00").
146 * function_options::set_return_type() and function_options::do_not_evalf_params()
147   now actually work.
148
149 1.0.13 (27 January 2003)
150 * Contracting epsilon tensors with Euclidean indices now works.
151 * Improved dummy index symmetrization in sums.
152 * Added dirac_gammaL/R(), which can be used instead of dirac_gamma6/7()
153   but are single objects, to allow for a more compact notation of Dirac
154   strings.
155 * Powers with negative numeric exponents are printed as fractions in the
156   LaTeX output.
157 * Added symbolic_matrix() for the convenient creation of matrices filled
158   with symbols.
159 * Added collect_common_factors() which collects common factors from the
160   terms of sums.
161 * simplify_indexed() converts "gamma~mu*p.mu" to "p\".
162
163 1.0.12 (30 October 2002)
164 * Fixed a bug in power::expand() that could produce invalid expressions.
165 * The input parser no longer ignores extra data following accepted input.
166 * Improved the CLN C-source output (integers are printed as integers, and
167   floating point numbers include the precision).
168 * Fixed a problem in the LaTeX-output of negative fractions.
169 * Added print_latex() and print_csrc() to ginsh.
170 * The sprem() function is now public.
171
172 1.0.11 (18 September 2002)
173 * Fixed a possible memory corruption in contractions of indexed objects with
174   delta or metric tensors.
175 * Computing the derivative of a power series object with respect to a symbol
176   that is not the expansion variable now works correctly.
177 * Several bugfixes in code generation.
178
179 1.0.10 (24 July 2002)
180 * Powers of indexed objects are now parenthesized correctly in LaTeX output.
181 * Input parser handles indices (they have to be specified in the same list
182   as the symbols).
183 * Added some limited support for subspaces in the idx and tensor classes.
184 * Fixed a bug in canonicalize() (antisymmetric canonicalization of an already
185   sorted list containing two or more equal objects failed to return 0).
186
187 1.0.9 (11 June 2002)
188 * simplify_indexed() now raises/lowers dummy indices to canonicalize the index
189   variance. This allows some simplifications that weren't possible before,
190   like eps~a.b~c~d*X.a*X~b -> 0 and X.a~a-X~a.a -> 0.
191 * Implemented relational::subs().
192 * Fixed bug in simplify_ncmul() for clifford objects.
193
194 1.0.8 (31 March 2002)
195 * Improvements in memory usage of the expand() methods.
196
197 1.0.7 (18 March 2002)
198 * Fixed LaTeX output of indexed and matrix objects.
199 * Fixed matrix::pow(n) for n==0 and added helper functions to create unit
200   matrices "ex unit_matrix(unsigned, unsigned)".
201
202 1.0.6 (4 March 2002)
203 * "(x+1).subs(x==x-1)" now returns the correct result "x" instead of "x-1".
204
205 1.0.5 (27 January 2002)
206 * (l)degree(s), coeff(s, n) and collect(s) were extended to accept expressions
207   of any class (except add/mul/ncmul/numeric) for "s". They should even work
208   if "s" is a "power" object, as long as the exponent is non-integer, but with
209   some limitations. For example, you can "collect(a*2^x+b*2^x, 2^x)" to get
210   "(a+b)*2^x", but "degree(2^(3*x), 2^x)" yields 0 instead of 3).
211 * Fixed a small output bug.
212
213 1.0.4 (24 January 2002)
214 * Speedup in expand().
215 * Faster Bernoulli numbers (Markus Nullmeier).
216 * Some minor bugfixes and documentation updates.
217
218 1.0.3 (21 December 2001)
219 * Fixed a bug where quo() would call vector::reserve() with a negative
220   argument.
221 * Fix several bugs in code generation.
222
223 1.0.2 (19 December 2001)
224 * Input parser recognizes "sqrt()", which is also used in the output.
225 * divide(a,b,q) only modifies q if the division succeeds; also, divide(a,b,a)
226   works now.
227 * Fixed small bug in dummy index renaming which could cause it to not
228   recognize renamable indices in some cases.
229 * power::degree() and power::ldegree() throw an exception when encountering
230   a non-integer exponent.
231 * Add output-support for Python bindings.
232
233 1.0.1 (22 November 2001)
234 * Function sqrfree() handles a few more cases now.
235 * Class relational has real canonical ordering now.
236 * Handle obscene libreadline version numbers when building ginsh.
237
238 1.0.0 (6 November 2001)
239 * Some internal reorganization resulting in a general speed-up.
240 * The last 3 evaluated expressions in ginsh are now referred to with the
241   tokens '%', '%%' and '%%%'. The old '"', '""' and '"""' remain for
242   compatibility but may be removed in a future version of GiNaC.
243
244 0.9.4 (20 September 2001)
245 * Functions have better support for external scripting languages.
246 * Interface cleanups and bugfixes.
247 * Fix silly bug in evalf() that prevented things like 2^Pi being computed.
248
249 0.9.3 (16 August 2001)
250 * series expansion now much more consistent for small order expansion.
251 * lsolve() accepts algorithmic hint as parameter.
252
253 0.9.2 (31 July 2001)
254 * Epsilon tensor is more functional.
255 * simplify_indexed() is better at detecting expressions that vanish for
256   symmetry reasons.
257 * Several little bugfixes and consistency enhancements.
258
259 0.9.1 (27 June 2001)
260 * Ctors of class numeric are not explicit any more.  All built-in callers for
261   pseudofunctions are now templated and default to ex arguments which relaxes
262   the need for explicit ctors.
263 * New functions/methods:
264    - find()
265    - remove_first(), remove_last(), sort() and unique() for lists
266    - symmetrize_cyclic()
267    - decomp_rational()
268 * Instead of just totally symmetric or antisymmetric, complex symmetries
269   can now be defined for indexed objects. Symmetries are described by a
270   tree of "symmetry" objects that is constructed with the sy_none(),
271   sy_symm(), sy_anti() and sy_cycl() functions. The symmetry of a function
272   with respect to its arguments can also be defined (this is currently
273   only used for the Beta function).
274 * Generalized map() to take a function object instead of a function pointer.
275   This allows passing an arbitrary number of additional state to the
276   function being called.
277 * color_trace(), dirac_trace(), diff(), expand(), evalf() and normal() work
278   better with container classes, e.g. using color_trace() on a relation will
279   take the trace on both sides, using diff() on a matrix differentiates every
280   element etc.
281 * diff() works properly with non-commutative products and indexed objects.
282 * New option flag "expand_function_args" for expand().
283 * Supplement some (now deprecated) macros by inlined template functions:
284   - is_of_type(foo, type) -> is_a<type>(foo)
285   - is_ex_of_type(foo, type) -> is_a<type>(foo)
286   - is_exaclty_of_type(foo, type) -> is_exaclty_a<type>(foo)
287   - is_ex_exaclty_of_type(foo, type) -> is_exaclty_a<type>(foo)
288   - ex_to_foobar(baz)  ->  ex_to<foobar>(baz)
289 * rem(c, p[x], x) (c: numeric, p[x]: polynomial) erroneously returned p[x]
290   instead of c.
291 * Small bugfixes in pattern matching.
292 * Updated libtool to version 1.4.
293
294 0.9.0 (7 June 2001)
295 * In the output and in ginsh, lists are now delimited by { } braces, and
296   matrices are delimited by single [ ] brackets.
297 * simplify_indexed() renames dummy indices so, e.g., "a.i*a.i+a.j*a.j" gets
298   simplified to "2*a.i*a.i" (or "2*a.j*a.j").
299 * New functions/methods:
300    - canonicalize_clifford() (helpful when comparing expressions containing
301      Dirac matrices)
302    - symmetrize() and antisymmetrize()
303    - numer_denom() (return numerator and denominator in one call)
304    - map() (apply function to subexpressions)
305    - evalm() (evaluate sums, products and integer powers of matrices)
306 * Added a new function match() for performing pattern matching. subs() and
307   has() also accept patterns as arguments. A pattern can be any expression,
308   optionally containing wildcard objects. These are constructed with the
309   call "wild(<unsigned>)" and are denoted as "$0", "$1" etc. in the output
310   and in ginsh.
311 * Positive integer powers of non-commutative expressions (except matrices)
312   are automatically expanded.
313 * Removed cint subdirectory, ginaccint is a separate package now due to 
314   packaging considerations.
315 * Several little bugfixes.
316
317 0.8.3 (11 May 2001)
318 * color and clifford classes are functional and documented.
319 * New "spinidx" class for dotted/undotted indices.
320 * Predefined spinor metric tensor (created by spinor_metric()).
321 * Symbols can have a LaTeX name, e.g. symbol s("s", "\\sigma");
322 * LaTeX output of indexed objects is much nicer.
323 * Fixed some build problems (with recent libreadline).
324 * Semantics of arithmetic operators now follows the C++ rules more strictly.
325
326 0.8.2 (24 April 2001)
327 * degree(), ldegree(), coeff(), lcoeff(), tcoeff() and collect() work with
328   non-symbols as the second argument in ginsh.
329 * the argument to collect() can be a list of objects in which case the
330   result is either a recursively collected polynomial, or a polynomial in
331   a distributed form with terms like coeff*x1^e1*...*xn^en, as specified by
332   the second argument to collect().
333 * Several bugfixes (including a nasty memory leak in .normal()).
334 * class matrix: solve() doesn't call algorithms redundantly any more and
335   inverse() falls back to solve() which works in more general cases.
336
337 0.8.1 (16 April 2001)
338 * degree(), ldegree(), coeff(), lcoeff(), tcoeff() and collect() can now
339   be used with constants, functions and indexed expressions as well, so you
340   can use it to collect by powers of Pi or sin(x), or to find the coefficient
341   of gamma~0.
342   Limitations:
343    - it only works with symbols, constants, functions and indexed expressions,
344      trying to find the coefficient of, e.g., "x^2" or "x+y" won't work;
345    - it does not know about dummy index summations; the coefficient of
346      gamma~0 in p.mu*gamma~mu should be p.0 but is returned as 0;
347    - using coeff(), tcoeff(), lcoeff() or collect() on elements of
348      noncommutative products might return wrong or surprising results.
349 * subs() no longer only substitutes symbols and indices but performs a more
350   general "syntactic substitution", i.e. it substitutes whole objects in sub-
351   expressions. You can subs((a+b)^2,a+b==3) and get 9, but subs(a+b+c,a+b==3)
352   doesn't do anything.
353   Limitations:
354    - substituting numerics (subs(expr, 2==4)) will not replace then in all
355      occurences; in general, you shouldn't substitute numerics, though.
356 * Added preliminary (re)implementations of color and clifford classes.
357 * simplify_indexed(): contraction of symmetric and antisymmetric tensors
358   is zero.
359 * Replaced the various print*() member functions by a single print() that
360   takes a print_context object that determines the output formatting. This
361   should make it easier to add more output types, such as LaTeX output,
362   which is based on work by Stefan Weinzierl.
363 * Added functions to retrieve the properties stored in archive objects
364   outside of unarchive() (for printing or debugging purposes).
365 * Some bugfixes (indexed objects, archive writing).
366 * .collect() on non-polynomials is now algebraically correct.
367
368 0.8.0 (24 March 2001)
369 * Complete revamp of indexed objects. Instead of multiple classes for
370   indexed things and their indices there is now only one "indexed" class
371   and two types of indices: "idx" for simple indices and "varidx" for
372   indices with variance. There are predefined delta, epsilon and metric
373   tensors, and a function simplify_indexed() that performs canonicalization
374   and dummy index summations. Matrix objects can be indexed for doing simple
375   linear algebra.
376 * Added an option "expand_indexed" to expand() to perform expansion of
377   indexed objects like (a+b).i -> a.i + b.i
378 * Renamed get_indices() to get_free_indices(), which no longer returns
379   dummy indices and checks the consistency of indices in sums.
380 * sqrfree() factorization fixed and improved syntactically.
381 * subs() works on matrices.
382 * Matrices can be constructed from flat list of elements; diagonal matrices
383   can be constructed from list of diagonal elements with diag_matrix().
384 * Fixed memory leak in expand().
385 * Operator% for objects of class ncmul has gone.  Use operator* now for that
386   case too, which is much more natural.
387
388 0.7.3 (28 February 2001)
389 * Several bugfixes and minor performance tunings.
390 * Added a section to the tutorial about adding new algebraic classes to GiNaC.
391 * Closed many in-source documentation gaps.
392
393 0.7.2 (17 February 2001)
394 * Several bugfixes in power series expansion, one of them critical.
395
396 0.7.1 (7 February 2001)
397 * Fix problems with Cint that were caused by CLN's overloaded operator new.
398 * Fix compilation errors with GCC3.
399 * normal() handles large sums of fractions better and normalizes the exponent
400   of power expressions.
401 * expand() always expands the exponent and transforms x^(a+b) -> x^a*x^b.
402 * Some bugfixes of series expansion around branch cuts of special functions.
403
404 0.7.0 (15 December 2000)
405 * Requires CLN 1.1 now.  Class numeric doesn't use an indirect pointer to the
406   actual representation any more.  This is a speedup.
407 * mul::expand() was reengineered to not allocate excess temporary memory.
408 * Non-integer powers of a symbol are treated as constants by (l)degree() and
409   coeff().  Using these functions on an expression containing such powers used
410   to fail with an internal error message.  The side-effect is that collect()
411   can be used on expressions which are not polynomials.
412 * Added a man page for the ginac-config script.
413 * Ctor of numeric from char* honors Digits.
414
415 0.6.4 (10 August 2000)
416 * Complete revamp of methods in class matrix.  Some redundant (and poor)
417   implementations of elimination schemes were thrown out.  The code is now
418   highly orthogonal, more flexible and much more efficient.
419 * Some long standing and quite nasty bugs were discovered and fixed in the
420   following functions: add::normal(), heur_gcd(), sr_gcd() and Order_eval().
421
422 0.6.3 (25 July 2000)
423 * Derivatives are now assembled in a slightly different manner (i.e. they
424   might 'look' different on first sight).  Under certain circumstances this
425   can result in a dramatic speedup because it gives hashing a better chance,
426   especially when computing higher derivatives.
427 * Some series expansions of built-in functions have been reengineered.
428 * The algorithm for computing determinants can be chosen by the user.  See
429   ginac/flags.h and ginac/matrix.h.
430 * The Dilogarithm (Li2) now has floating point evaluation, derivative and a
431   proper series expansion.
432 * Namespace 'std' cleanly disentangled, as demanded by ISO/EIC 14882-1998(E).
433 * Some minor bugfixes, one major lsolve()-bugfix and documentation updates.
434
435 0.6.2 (21 June 2000)
436 * ginaccint.bin is now launched by a binary program instead of by a scripts.
437   This allows us to write #!-scripts.  A small test suite for GiNaC-cint was
438   added.
439 * Several minor bugfixes.
440
441 0.6.1 (18 May 2000)
442 * Cleanup in the interface to Cint.  The required version is now Cint 5.14.38.
443 * Several bugfixes in target install.
444
445 0.6.0 (11 May 2000)
446 * IMPORTANT: Several interface changes make programs written with GiNaC 
447   much clearer but break compatibility with older versions:
448   - f(x).series(x,p[,o]) -> f(x).series(x==p,o)
449   - series(f(x),x,p[,o]) -> series(f(x),x==p,o)
450   - gamma() -> tgamma()  (The true Gamma function, there is now also
451     log(tgamma()), called lgamma(), in accord with ISO/IEC 9899:1999.)
452   - EulerGamma -> Euler
453 * #include'ing ginac.h defines the preprocessor symbols GINACLIB_MAJOR_VERSION,
454   GINACLIB_MINOR_VERSION, and GINACLIB_MICRO_VERSION with the respective GiNaC
455   library version numbers.
456 * Expressions can be constructed from strings like this:
457     ex e("2*x+y", lst(x, y));
458 * ex::to_rational() provides a way to extend the domain of functions like
459   gcd() and divide() that only work on polynomials or rational functions (the
460   good old ex::subs() method reverses this process)
461 * Calling diff() on a function that has no derivative defined returns the
462   inert derivative function "Derivative".
463 * Several new timings in the check target.  Some of them may be rather rude 
464   at your machine, feel free to interrupt them.
465
466 0.5.4 (15 March 2000)
467 * Some algorithms in class matrix (notably determinant) were replaced by
468   less brain-dead ones and should now have much better performance.
469 * Checks were completely reorganized and split up into three parts:
470   a) exams (small regression tests with predefined input)
471   b) checks (lenghty coherence checks with random input)
472   c) timings (for coherence and crude benchmarking)
473 * Behaviour of .evalf() was changed: it doesn't .evalf() any exponents.
474 * Expanded expressions now remember they are expanded to prevent
475   superfluous expansions.
476 * Small bugfixes and improvements in the series expansion.
477
478 0.5.3 (23 February 2000)
479 * A more flexible scheme for registering functions was implemented,
480   allowing for remembering, too.
481 * Some Bugfixes.
482
483 0.5.2 (16 February 2000)
484 * Mainly fixes a bug in the packaging of release 0.5.1.
485
486 0.5.1 (14 February 2000)
487 * Fixes a small number of bugs.
488
489 0.5.0 (7 February 2000)
490 * Expressions can be written ("archived") to files and read therefrom.
491 * Addition of GiNaC-cint, which lets you write complete programs in
492   an interactive shell-like manner in your favoured programming
493   language (i.e. C++).
494
495 0.4.1 (13 December 1999)
496 * Series Expansion of Gamma function and some other trigonometric
497   functions at their poles works now.
498 * Many more evaluations of special functions at points where
499   exact results exist.
500 * info_flags::rational doesn't return true for complex extensions
501   any more---use info_flags::crational for the old behaviour.
502   info_flags::integer and -::cinteger work similarly, the same
503   holds for types like info_flags::rational_polynomial.
504
505 0.4.0 (26 November 1999)
506 * First public release.