]> www.ginac.de Git - ginac.git/commitdiff
[BUGFIX] Fix crash in parser. master
authorRichard Kreckel <kreckel@ginac.de>
Fri, 5 Apr 2024 16:34:48 +0000 (18:34 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 5 Apr 2024 16:34:48 +0000 (18:34 +0200)
Relying on aligned functions is non-portable.

Reported by Diego Conti <diego.conti@unipi.it>.

225 files changed:
AUTHORS
Makefile.am
NEWS
check/check_cra.cpp
check/check_inifcns.cpp
check/check_lsolve.cpp
check/check_matrices.cpp
check/check_numeric.cpp
check/error_report.h
check/exam_archive.cpp
check/exam_chinrem_gcd.cpp
check/exam_clifford.cpp
check/exam_collect.cpp
check/exam_color.cpp
check/exam_differentiation.cpp
check/exam_factor.cpp
check/exam_heur_gcd.cpp
check/exam_indexed.cpp
check/exam_inifcns.cpp
check/exam_inifcns_elliptic.cpp
check/exam_inifcns_nstdsums.cpp
check/exam_inifcns_nstdsums.h
check/exam_lsolve.cpp
check/exam_match.cpp
check/exam_matrices.cpp
check/exam_misc.cpp
check/exam_mod_gcd.cpp
check/exam_normalization.cpp
check/exam_numeric.cpp
check/exam_paranoia.cpp
check/exam_parser.cpp
check/exam_polygcd.cpp
check/exam_powerlaws.cpp
check/exam_pseries.cpp
check/exam_real_imag.cpp
check/exam_relational.cpp
check/exam_sqrfree.cpp
check/exam_structure.cpp
check/genex.cpp
check/randomize_serials.cpp
check/test_runner.h
check/time_antipode.cpp
check/time_dennyfliegner.cpp
check/time_fateman_expand.cpp
check/time_gammaseries.cpp
check/time_lw_A.cpp
check/time_lw_B.cpp
check/time_lw_C.cpp
check/time_lw_D.cpp
check/time_lw_E.cpp
check/time_lw_F.cpp
check/time_lw_G.cpp
check/time_lw_H.cpp
check/time_lw_IJKL.cpp
check/time_lw_M1.cpp
check/time_lw_M2.cpp
check/time_lw_N.cpp
check/time_lw_O.cpp
check/time_lw_P.cpp
check/time_lw_Pprime.cpp
check/time_lw_Q.cpp
check/time_lw_Qprime.cpp
check/time_parser.cpp
check/time_toeplitz.cpp
check/time_uvar_gcd.cpp
check/time_vandermonde.cpp
check/timer.cpp
check/timer.h
config/config.rpath
configure.ac
doc/CMakeLists.txt
doc/reference/Makefile.am
doc/tutorial/ginac.texi
ginac/add.cpp
ginac/add.h
ginac/archive.cpp
ginac/archive.h
ginac/assertion.h
ginac/basic.cpp
ginac/basic.h
ginac/class_info.h
ginac/clifford.cpp
ginac/clifford.h
ginac/color.cpp
ginac/color.h
ginac/compiler.h
ginac/constant.cpp
ginac/constant.h
ginac/container.h
ginac/ex.cpp
ginac/ex.h
ginac/excompiler.cpp
ginac/excompiler.h
ginac/expair.cpp
ginac/expair.h
ginac/expairseq.cpp
ginac/expairseq.h
ginac/exprseq.cpp
ginac/exprseq.h
ginac/factor.cpp
ginac/factor.h
ginac/fail.cpp
ginac/fail.h
ginac/fderivative.cpp
ginac/fderivative.h
ginac/flags.h
ginac/function.cppy
ginac/function.hppy
ginac/ginac.h
ginac/hash_map.h
ginac/idx.cpp
ginac/idx.h
ginac/indexed.cpp
ginac/indexed.h
ginac/inifcns.cpp
ginac/inifcns.h
ginac/inifcns_elliptic.cpp
ginac/inifcns_gamma.cpp
ginac/inifcns_nstdsums.cpp
ginac/inifcns_trans.cpp
ginac/integral.cpp
ginac/integral.h
ginac/integration_kernel.cpp
ginac/integration_kernel.h
ginac/lst.cpp
ginac/lst.h
ginac/matrix.cpp
ginac/matrix.h
ginac/mul.cpp
ginac/mul.h
ginac/ncmul.cpp
ginac/ncmul.h
ginac/normal.cpp
ginac/normal.h
ginac/numeric.cpp
ginac/numeric.h
ginac/operators.cpp
ginac/operators.h
ginac/parser/debug.h
ginac/parser/default_reader.cpp
ginac/parser/lexer.cpp
ginac/parser/lexer.h
ginac/parser/parse_binop_rhs.cpp
ginac/parser/parse_context.cpp
ginac/parser/parse_context.h
ginac/parser/parser.cpp
ginac/parser/parser.h
ginac/parser/parser_compat.cpp
ginac/polynomial/chinrem_gcd.cpp
ginac/polynomial/chinrem_gcd.h
ginac/polynomial/collect_vargs.cpp
ginac/polynomial/collect_vargs.h
ginac/polynomial/cra_garner.cpp
ginac/polynomial/cra_garner.h
ginac/polynomial/debug.h
ginac/polynomial/divide_in_z_p.cpp
ginac/polynomial/divide_in_z_p.h
ginac/polynomial/euclid_gcd_wrap.h
ginac/polynomial/eval_point_finder.h
ginac/polynomial/eval_uvar.h
ginac/polynomial/gcd_euclid.h
ginac/polynomial/gcd_uvar.cpp
ginac/polynomial/heur_gcd_uvar.h
ginac/polynomial/interpolate_padic_uvar.h
ginac/polynomial/mgcd.cpp
ginac/polynomial/mod_gcd.cpp
ginac/polynomial/mod_gcd.h
ginac/polynomial/newton_interpolate.h
ginac/polynomial/normalize.cpp
ginac/polynomial/normalize.h
ginac/polynomial/optimal_vars_finder.cpp
ginac/polynomial/optimal_vars_finder.h
ginac/polynomial/pgcd.cpp
ginac/polynomial/pgcd.h
ginac/polynomial/poly_cra.h
ginac/polynomial/prem_uvar.h
ginac/polynomial/primes_factory.h
ginac/polynomial/primpart_content.cpp
ginac/polynomial/remainder.cpp
ginac/polynomial/remainder.h
ginac/polynomial/ring_traits.h
ginac/polynomial/smod_helpers.h
ginac/polynomial/sr_gcd_uvar.h
ginac/polynomial/upoly.h
ginac/polynomial/upoly_io.cpp
ginac/polynomial/upoly_io.h
ginac/power.cpp
ginac/power.h
ginac/print.cpp
ginac/print.h
ginac/pseries.cpp
ginac/pseries.h
ginac/ptr.h
ginac/registrar.cpp
ginac/registrar.h
ginac/relational.cpp
ginac/relational.h
ginac/remember.cpp
ginac/remember.h
ginac/structure.h
ginac/symbol.cpp
ginac/symbol.h
ginac/symmetry.cpp
ginac/symmetry.h
ginac/tensor.cpp
ginac/tensor.h
ginac/utils.cpp
ginac/utils.h
ginac/utils_multi_iterator.h
ginac/version.h
ginac/wildcard.cpp
ginac/wildcard.h
ginsh/ginsh.1.in
ginsh/ginsh.h
ginsh/ginsh_extensions.h
ginsh/ginsh_lexer.lpp
ginsh/ginsh_parser.ypp
m4/ax_cxx_compile_stdcxx.m4
m4/host-cpu-c-abi.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
scripts/fixupind.py [deleted file]
tools/viewgar.1.in
tools/viewgar.cpp

diff --git a/AUTHORS b/AUTHORS
index 5b4f59efc1d43b4c502368bc7322876fad83e1dd..f853d305add86bca372c40d6d3bfc983a4fc6d7e 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,5 +1,5 @@
-Contacing the developers
-------------------------
+Contacting the developers
+-------------------------
 
 If you have found a bug, have a patch or a question, or would like to
 make a suggestion please send email to one of our public mailing lists
index 950d12d5365a00c175991d20f3fb141dc1b1d418..8d66956d90930de471229c3f34bc53dc4a0eb5a1 100644 (file)
@@ -17,7 +17,7 @@ CMAKE_FILES = CMakeLists.txt \
              cmake/modules/FindGiNaC.cmake \
              cmake/modules/FindLibDL.cmake
 
-BUILD_HELPERS = scripts/yaptu.py scripts/fixupind.py
+BUILD_HELPERS = scripts/yaptu.py
 
 # All the rest of the distributed files
 EXTRA_DIST = ginac.pc GiNaC.spec $(BUILD_HELPERS) $(CMAKE_FILES)
diff --git a/NEWS b/NEWS
index 047fce5dc476b78eb12c05c63b05185a006fb998..828b0130e9dbc02cae70f73d060937df6252d4fd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,19 @@
 This file records noteworthy changes.
 
+1.8.7 (12 August 2023)
+* Fix series expansion of polynomial(x)^n for small and large n.
+* Fix bugs in internal parser from strings.
+* Make ginsh evaluate line-by-line in non-interactive mode.
+* Several build fixes.
+
+1.8.6 (8 February 2023)
+* Fix wrong numeric info on transcendental functions.
+* Fix crash of evaluation of binomial(n, k) with negative integer n, k.
+
+1.8.5 (1 January 2023)
+* Speed up multivariate polynomial factorization; fix it in some rare
+  corner cases where it didn't previously terminate.
+
 1.8.4 (19 September 2022)
 * Add support for sqrfree_parfrac().
 * Add info methods for transcendental functions.
index 5ef089b598affb43152cbb0b162facd019cea206..e3f86a197eb7badef0de17e77f355fd47debe792 100644 (file)
@@ -3,7 +3,7 @@
  *  Test of Chinese remainder algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5c679c055fecf081f1f288319ed073d04a728383..6c212dc469688d229e270aad1143fb13b39db378 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 335121c671321f0a88a06832176dc351845084d2..8496b45c7923bd3b55410d19a49d69e8abbf80c4 100644 (file)
@@ -5,7 +5,7 @@
  *  the underlying symbolic manipulations. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d8d6a06363f5908ff5ed0b9a79b839cdc08e1505..f0e383523f5d6e0073185ff6129436fc89613608 100644 (file)
@@ -5,7 +5,7 @@
  *  manipulations. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5604266b3334103f57663bfd7879cd2fb9408c7c..a2b08a9ce3a2bff6c6fd4cead9361cf4f5ef1e3a 100644 (file)
@@ -4,7 +4,7 @@
  *  tests on these numbers like is_integer() etc... */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f3e76fe2f12ffacff19cce77772551c4e6d78131..a5db742510e931f4b442032b8821665592473dde 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 2bd7e3af91e2110bda49b54bce87ab7896f43112..fcc3b7ad8486eacb3d7a10553e66e131ccf9b0f5 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test GiNaC's archiving system. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f5f79394e960ab4de12b145eb1444a639c848c6b..b020a71eb715f6b48341dbfbc598545d482afcea 100644 (file)
@@ -3,7 +3,7 @@
  * A small program exposing historical bug in poly_cra function. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c7b8f4f2080b15e739778a21f088fc86cf32f05d..3c90a327e52fe93d48f25e461a95ee449e721ae6 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test GiNaC's Clifford algebra objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e342aee59e321291f3ede8a0ae61644738911119..65cad598fb9575b0fb8efe3d98d9cdb32a3cf434 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 796b02d149ec91c252aedbd1c95a37d0effbfc9c..590cf2dbd5bb60ba7f441b02dc58cfd4e96ade8b 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test GiNaC's color objects (su(3) Lie algebra). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c5b09282fad58cce84965a2d8176aa44b2f984b3..39baeafc93dc6a092453469211f2f648b0212b97 100644 (file)
@@ -3,7 +3,7 @@
  *  Tests for symbolic differentiation, including various functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f5c5dc056476592181af39958a835303e429a236..cf1dd06c6b2a41cb2df0113669093f4e5312ad26 100644 (file)
@@ -3,7 +3,7 @@
  *  Factorization test suite. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4a19a08f9d3b0a6c55014559aef824f19cace32a..064a4339b83261b5da53e6d8862229f3b471f948 100644 (file)
@@ -7,7 +7,7 @@
  *  endless loop or (even worse) wrong result. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 65ef8e3fbe5f779880485411436978db136d3764..602095109246061af41839c64aa302417e1e74bb 100644 (file)
@@ -3,7 +3,7 @@
  *  Here we test manipulations on GiNaC's indexed objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 078170903f19a68615d70ee0e42d073ace4ed345..a2c6a933f04d81291c590f4db526efc7afc6ee13 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c203f109cdb393f066583eefe3d9cd8a59dd714b..7e79d96aec4ee6d1098df9984a1ad350de03574c 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index abc7040f5b3e5df665dac87f5b5e5da919d3c925..5b1baf6b37552561989a3bfb716228fad2ae7f45 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5299f8a8d5c474c7fec470323e388729ce52295f..60e2fe3460550f7acfcf9149defb1c6e272fa5be 100644 (file)
@@ -3,7 +3,7 @@
  *  Comparison data for the test of polylogarithms. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d18576f6e43a9cc85b1476f1fe3394511369dd3c..6da7a7b971119fb457901b6ffd84d1760dcda9d1 100644 (file)
@@ -3,7 +3,7 @@
  *  These exams test solving small linear systems of symbolic equations. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c23e4135ed9b63964d4bfd75f3195c5d73183485..f71ec4d45f7adde68ece84d20f6c51204c9af0d8 100644 (file)
@@ -4,7 +4,7 @@
  *  https://www.ginac.de/pipermail/ginac-devel/2006-April/000942.html */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 657c1e9492c53b3e8e70cc46c4668e8386e37a05..1d5b081769e2fc53b5bc4333c4d75a012cf173f5 100644 (file)
@@ -4,7 +4,7 @@
  *  Here we examine manipulations on GiNaC's symbolic matrices. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 1b07eb75df2d09c762ef1ec4df58940230dfff9f..31e0e9e21e3a62b1b80665e733375e5c73ea3787 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 16e8acb2cbbdc48ef4a732b7d97c37adbdc79420..5b0675c94b08384aee8869054d3d8b2bfb52048a 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4a7157fb6d77b24ca65b28ab5f4508d4084d6854..ded231f309cd08289b5fdab3a6e4e58ab4f400ca 100644 (file)
@@ -3,7 +3,7 @@
  *  Rational function normalization test suite. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b366320631398b589ee2e3d4fcbd6751dd647813..ebea234dd9620dece4fe96853fa3fa60ab620b46 100644 (file)
@@ -4,7 +4,7 @@
  *  tests on these numbers like is_integer() etc... */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c875c2f7121f2c5d7a9d38c8b8bf164705cdb18b..d8a6027db37a3525752d67d1056fa5935c6cfd2e 100644 (file)
@@ -6,7 +6,7 @@
  *  these oopses for good, so we run those stupid tests... */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 497d9160c703127bfc5c855e4297229b698c82a6..2c65cd54eb7695d058cd16a76e5cad2fd78be255 100644 (file)
@@ -3,7 +3,7 @@
  *  Check for some silly bugs in the parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -98,6 +98,104 @@ static int check4(ostream& err_str)
        }
 }
 
+// Check that two strings parse to equal expressions.
+static int check_eq(ostream &err_str, parser &reader, const char *expr1, const char *expr2)
+{
+       const string srep1(expr1);
+       const string srep2(expr2);
+       ex e1, e2;
+       try{ e1 = reader(srep1); } catch (const exception &e) {
+               err_str << "\"" << srep1 << "\" failed to parse: "
+                       << e.what() << endl;
+               return 1;
+       }
+       try{ e2 = reader(srep2); } catch (const exception &e) {
+               err_str << "\"" << srep2 << "\" failed to parse: "
+                       << e.what() << endl;
+               return 1;
+       }
+       if (!(e1-e2).expand().is_zero()) {
+               err_str << "\"" << srep1 << "\" was misparsed as \""
+                       << e1 << "\"" << endl;
+               return 1;
+       }
+       return 0;
+}
+
+// Tests for the interaction of the '^' operator with
+// the unary '+' and the unary '-' operators
+static int check5(ostream& err_str)
+{
+       parser reader;
+       return
+               +check_eq(err_str, reader, "3^2+1", "10")
+               +check_eq(err_str, reader, "3^+2-1", "8")
+               +check_eq(err_str, reader, "3^-2+1", "10/9")
+               +check_eq(err_str, reader, "3^-2/5", "1/45")
+               +check_eq(err_str, reader, "3^-2*5", "5/9")
+               +check_eq(err_str, reader, "3^-2-5", "-44/9")
+               +check_eq(err_str, reader, "3^(-2)+1", "10/9")
+               +check_eq(err_str, reader, "(3)^(-2)+1", "10/9")
+               +check_eq(err_str, reader, "+3^2+1", "10")
+               +check_eq(err_str, reader, "+3^+2+1", "10")
+               +check_eq(err_str, reader, "+3^-2+1", "10/9")
+               +check_eq(err_str, reader, "+3^-2/5", "1/45")
+               +check_eq(err_str, reader, "+3^-2*5", "5/9")
+               +check_eq(err_str, reader, "+3^-2-5", "-44/9")
+               +check_eq(err_str, reader, "-3^2+1", "-8")
+               +check_eq(err_str, reader, "-3^+2+1", "-8")
+               +check_eq(err_str, reader, "-3^-2+1", "8/9")
+               +check_eq(err_str, reader, "-3^-2/3", "-1/27")
+               +check_eq(err_str, reader, "1+2^3^4", "1+(2^81)")
+               +check_eq(err_str, reader, "2^3^4+1", "1+(2^81)")
+               +check_eq(err_str, reader, "2^+3^4+1", "1+(2^81)")
+               +check_eq(err_str, reader, "2^3^+4+1", "1+(2^81)");
+}
+
+// Tests for the interaction of the '*' operator with
+// the unary '+' and the unary '-' operators
+static int check6(ostream& err_str)
+{
+       parser reader;
+       return
+               +check_eq(err_str, reader, "3*+2-1", "5")
+               +check_eq(err_str, reader, "3*2+1", "7")
+               +check_eq(err_str, reader, "3*+2+1", "7")
+               +check_eq(err_str, reader, "3*-2+1", "-5")
+               +check_eq(err_str, reader, "3*-2/5", "-6/5")
+               +check_eq(err_str, reader, "3*-2*5", "-30")
+               +check_eq(err_str, reader, "3*-2-5", "-11")
+               +check_eq(err_str, reader, "3*(-2)+1", "-5")
+               +check_eq(err_str, reader, "(3)*(-2)+1", "-5")
+               +check_eq(err_str, reader, "+3*2+1", "7")
+               +check_eq(err_str, reader, "+3*+2+1", "7")
+               +check_eq(err_str, reader, "+3*-2+1", "-5")
+               +check_eq(err_str, reader, "+3*-2/5", "-6/5")
+               +check_eq(err_str, reader, "+3*-2*5", "-30")
+               +check_eq(err_str, reader, "+3*-2-5", "-11")
+               +check_eq(err_str, reader, "-3*2+1", "-5")
+               +check_eq(err_str, reader, "-3*+2+1", "-5")
+               +check_eq(err_str, reader, "-3*-2+1", "7")
+               +check_eq(err_str, reader, "-3*-2/3", "2")
+               +check_eq(err_str, reader, "1+2*3*4", "25")
+               +check_eq(err_str, reader, "2*3*4+1", "25")
+               +check_eq(err_str, reader, "2*+3*4+1", "25")
+               +check_eq(err_str, reader, "2*3*+4+1", "25");
+}
+
+// Tests for nested unary + and unary -
+static int check7(ostream& err_str)
+{
+       parser reader;
+       return
+               +check_eq(err_str, reader, "+1", "1")
+               +check_eq(err_str, reader, "++1", "1")
+               +check_eq(err_str, reader, "+-+1", "-1")
+               +check_eq(err_str, reader, "+-+-1", "1")
+               +check_eq(err_str, reader, "+-+-+1", "1")
+               +check_eq(err_str, reader, "100++--+1+10", "111");
+}
+
 int main(int argc, char** argv)
 {
        cout << "examining old parser bugs" << flush;
@@ -107,6 +205,9 @@ int main(int argc, char** argv)
        errors += check2(err_str);  cout << '.' << flush;
        errors += check3(err_str);  cout << '.' << flush;
        errors += check4(err_str);  cout << '.' << flush;
+       errors += check5(err_str);  cout << '.' << flush;
+       errors += check6(err_str);  cout << '.' << flush;
+       errors += check7(err_str);  cout << '.' << flush;
        if (errors) {
                cout << "Yes, unfortunately:" << endl;
                cout << err_str.str();
index 1396e7db54eb45d98c73c09b2edcec5e680c53c3..ba2570da9cdf7ef7497decde14302051bf36c840 100644 (file)
@@ -4,7 +4,7 @@
  *  rational function normalization in normalization.cpp. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 705e40af25e0cc00d8dae30370beadb9fa603f03..b6b105521e3aae577f3e0f131d5dfa2ae946cc3f 100644 (file)
@@ -4,7 +4,7 @@
  *  this code, it is a sanity check rather deeply rooted in GiNaC's classes. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f0fead05232ccd13fd4c6f5559fc28b7c7f41afd..c2669c422df43878a011a41bcb25c4bb15dc2580 100644 (file)
@@ -3,7 +3,7 @@
  *  Series expansion test (Laurent and Taylor series). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -390,6 +390,24 @@ static unsigned exam_series14()
        return result;
 }
 
+// Test expansion of powers of polynomials.
+static unsigned exam_series15()
+{
+       unsigned result = 0;
+
+       ex e = pow(x + pow(x,2), 2);
+
+       result += check_series(e, 0, Order(1), 0);
+       result += check_series(e, 0, Order(x), 1);
+       result += check_series(e, 0, Order(pow(x,2)), 2);
+       result += check_series(e, 0, pow(x,2) + Order(pow(x,3)), 3);
+       result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + Order(pow(x,4)), 4);
+       result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 5);
+       result += check_series(e, 0, pow(x,2) + 2*pow(x,3) + pow(x,4), 6);
+
+       return result;
+}
+
 unsigned exam_pseries()
 {
        unsigned result = 0;
@@ -410,6 +428,7 @@ unsigned exam_pseries()
        result += exam_series12();  cout << '.' << flush;
        result += exam_series13();  cout << '.' << flush;
        result += exam_series14();  cout << '.' << flush;
+       result += exam_series15();  cout << '.' << flush;
        
        return result;
 }
index 2378add3e41a0bbe83172eea1b18f4631a36ab90..7c0b441537e6aa58d91b6b2baa3d6148970ab460 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 687f9097504bfb51650bd33421bc36d43716f7b3..ec9a2d7882260c1133bc17979d9b0cdf93653570 100644 (file)
@@ -3,7 +3,7 @@
  *  Small test for the relational objects and their conversion to bool. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b2d7ee3b73f9c1ec1db69e47bbb04b9c47ab3081..014d703f48161620227e7cd446bfe1c50c15603a 100644 (file)
@@ -3,7 +3,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9c6f0c28c602ca8ec00c21b06033880d63bbc0c3..b9a403a9f7d62dc5054476fbef2a2c9f84012207 100644 (file)
@@ -3,7 +3,7 @@
  *  Small test for the structure<> template. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 17d2c21ee5f7f968b934c7e1c9b5a877fec57c49..84b7fc0ec6d69c15024331772a013a8a34d2cacb 100644 (file)
@@ -4,7 +4,7 @@
  *  input in the consistency checks. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 62e7718cf3e56c7f3dd3b26d571be7c80616f4e8..9819449474a839bf6fec4d156c1ccd818bd4af55 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ce7dfa33213eef0b1023c929e059725cfde82ad7..e3c7315ad30c9edd704375aa9358d46a1bc675f7 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility functions for benchmarking. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4e90bc4a2ea3d88e178a0c69cf126e05d0f86c4a..b5109ce8ecd1e117a583f33c3027035eb2daf2a0 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index caa5b204ab12d760be7b6e57c8941e1ed487a7c3..f83de63dcf2459ff48a07a94ddcc447770b11c24 100644 (file)
@@ -7,7 +7,7 @@
  *  after which e should be just a1^2. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b9d6bbe84470b46f95c7e3b3859aa8a75c5e5d39..fb0f31deb28ae193f7c512a39cb9787e702481e5 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b39c557e75a4b1a34a81a513d51a3b260172f33d..6810797031e0b7442589a375d4deddcae2055a9c 100644 (file)
@@ -3,7 +3,7 @@
  *  Some timings on series expansion of the Gamma function around a pole. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index aa224ff4ced4f533e1199b1a2191dc223ade5fee..9f40ad2813f4c3c74d863711cb3639c401d32798 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index eab20b9ef3cba606c5df02b13e9b0cb6c214f034..356fd67bf45311f5d342caf414532deade2de781 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 7d5469a0cddd9db792552c4dada00273cbcfbfbd..752b02e6172e3c42b6e3e8dcc70149b90a6cae22 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ff4984d9011beeb60d16f8196e4a7d42a4499bc1..516592ad15667a75be6eebf0539e1ac52ed95733 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 48d0bf8c2ab1939600ca4dcb93b2872960749fb3..d8ca7f2bdc6bdb7331bb385cbaa6725191fef3ac 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4c280a660f501037f4a0c58c8790ac09d4e46f93..a359c2c950790399ad8678899db8473cd244e5da 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 866651387dc538319df7d9962fea4ddb2cd2c5b2..85100b2e4d26cf5fe578648a078af6b8fbe88327 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5cbcb762a6959b70b9c448161cbff127e1ea5480..8428d2aa04b6af71de15e08bb5c5ca8128159672 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c64e52670e95f89c2e95f9d4eea2221acf05bef6..e83383def7c13b02f16e8d933babb1ec09ac68dd 100644 (file)
@@ -4,7 +4,7 @@
  *  by Robert H. Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 22fdb85667d033ed9ad2733973ecc4cf0c6eb978..208e22d381e6497e20c4806e9bd3a0cb2bf61bfe 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d42d41118129956f27766b7d9b2d2c9788ed6ad6..64867886f7d673b80568da995349bc9103ef03ef 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4a5f0bf6020b21b85a15c0f70758f1bc8fe93984..4b0f83b592acb42e3c47e7d6c6d7dbfc7cf6b6c6 100644 (file)
@@ -5,7 +5,7 @@
  *  Fermat-test). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e79591a6e34d6b47914d315ab142463c4297e6f4..6044a0a6d403e8d067d36db3336fb9bc7ba1c546 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4ff9ccd0bb328b3195c45aeab70d15cb8e45a90c..9e37b952c45f72ae454aabf1721a3de35d4bafe2 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 6d79bb431ea6df202a61d3fd877785dc65d3cf0f..82a0e4f0499b8cba92f74fa739183239ebd50c78 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d2be200551b0c8ba5d03c59f6439e4c6f71fd0e5..15363a519c983ae0eab31b9da904269c5462d126 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4a11d8b8cd6a5dcaafe223c416b7527dc76555cc..947d8f9fe6a472c55b578cb7194cd01aeeb4d1fc 100644 (file)
@@ -4,7 +4,7 @@
  *  Lewis and Michael Wester. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 45278ec2d480efe1ef131fb9e315b283aaf0f976..426ed2e972c93e1f88e7d2eb0cb129fd21145936 100644 (file)
@@ -3,7 +3,7 @@
  *  Time the parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a6d2e03e8130e7fbf1f41a61ebb67bbd06950011..236425c5c54054b77344572ca97a6c25cddc1889 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 36ff6de7c8f3aeaab405ca6dbefe14668121a341..32701f9fd3dac5f6ae5c26650bcd675c1a7ef63c 100644 (file)
@@ -3,7 +3,7 @@
  *  Time the different GCD algorithms. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index dfdf9f1d1b24ae9663f68d8484492ffa6f772fb0..84448a75d3b6f0e6e3fde26d5f31980466e515e1 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0dc3b864285755be8dc3aa1706057aa95b7bc563..4188b7e14555640575b1c83a99114fa11974dc45 100644 (file)
@@ -3,7 +3,7 @@
  *  A simple stop watch class. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 82834422d40f379a5d79098b65282764e6d14f50..641ae43f84bcf717d6e4773e177a5571541b0551 100644 (file)
@@ -3,7 +3,7 @@
  *  A simple stop watch class. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a3e25c844d15f579f0456df434c7f698487c86f7..1e2595ff5907067b1aafb3095298ec02eab5adb7 100755 (executable)
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2015 Free Software Foundation, Inc.
+#   Copyright 1996-2023 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 #
@@ -371,7 +371,7 @@ else
       hardcode_direct=yes
       hardcode_minus_L=yes
       ;;
-    freebsd* | dragonfly*)
+    freebsd* | dragonfly* | midnightbsd*)
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       ;;
@@ -547,7 +547,7 @@ case "$host_os" in
   freebsd[23].*)
     library_names_spec='$libname$shrext$versuffix'
     ;;
-  freebsd* | dragonfly*)
+  freebsd* | dragonfly* | midnightbsd*)
     library_names_spec='$libname$shrext'
     ;;
   gnu*)
index 550214817ea51ab91103c94ba379134c843c0dcc..96c89358765205f1d815d2dc9162a23223158818 100644 (file)
@@ -74,7 +74,7 @@ AC_PATH_PROG(PDFLATEX, pdflatex, "")
 AC_PATH_PROG(MAKEINDEX, makeindex, "")
 AC_PATH_PROG(MAKEINFO, makeinfo, "")
 AC_PATH_PROG(DVIPS, dvips, "")
-AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z $"PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)])
+AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z "$PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)])
 AC_PATH_PROG(FIG2DEV, fig2dev, "")
 AM_CONDITIONAL(CONFIG_FIG2DEV, [test ! -z "$FIG2DEV"])
 AS_IF([test -z "$FIG2DEV" -o -z "$MAKEINFO"],
index 5f17dc27344a59b146de7b8ba6d855934964cfde..e38e2a198ab2a5920ee78d57223fdd97112e8734 100644 (file)
@@ -35,7 +35,6 @@ macro(pdflatex_process texfile)
        set(_idx ${_dirname}/${_basename}.idx)
        set(_ind ${_dirname}/${_basename}.ind)
        set(_pdf ${_dirname}/${_basename}.pdf)
-       set(_fixupind ${CMAKE_SOURCE_DIR}/scripts/fixupind.py)
        add_custom_command(
                OUTPUT ${_idx}
                COMMAND ${PDFLATEX_COMPILER} ${texfile}
@@ -45,7 +44,6 @@ macro(pdflatex_process texfile)
        add_custom_command(
                OUTPUT ${_ind}
                COMMAND ${MAKEINDEX_COMPILER} ${_idx}
-               COMMAND ${PYTHON} ${_fixupind} ${_idx}
                WORKING_DIRECTORY ${_dirname}
                DEPENDS ${texfile} ${_idx}
                COMMENT "MAKEINDEX ${_basename}.idx")
index 445eeb729a4535d2a8e74836435326d89d6189dc..5ad8a0006616e8ec1b1d9536fd7a226f6e638d8f 100644 (file)
@@ -53,7 +53,6 @@ pdflatex/reference.pdf: pdflatex/reference.tex
                cd pdflatex; \
          ${PDFLATEX} reference.tex ;\
          ${MAKEINDEX} reference.idx ;\
-         ${PYTHON} $(abs_top_srcdir)/scripts/fixupind.py reference.ind; \
          ${PDFLATEX} reference.tex
 
 reference.dvi: latex latex/reference.dvi
index 62da18ceb5cebb28cb74099084ccfc83930d9ba6..52c5828e95a178e8d2de18d3e66d3fb3c7fb2adb 100644 (file)
@@ -24,7 +24,7 @@
 This is a tutorial that documents GiNaC @value{VERSION}, an open
 framework for symbolic computation within the C++ programming language.
 
-Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -52,7 +52,7 @@ notice identical to this one.
 
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1999-2023 Johannes Gutenberg University Mainz, Germany
+Copyright @copyright{} 1999-2024 Johannes Gutenberg University Mainz, Germany
 @sp 2
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -135,7 +135,7 @@ the near future.
 
 @section License
 The GiNaC framework for symbolic computation within the C++ programming
-language is Copyright @copyright{} 1999-2023 Johannes Gutenberg
+language is Copyright @copyright{} 1999-2024 Johannes Gutenberg
 University Mainz, Germany.
 
 This program is free software; you can redistribute it and/or
@@ -3242,7 +3242,8 @@ element, which defaults to 4.
 The @code{dirac_trace()} function is a linear functional that is equal to the
 ordinary matrix trace only in @math{D = 4} dimensions. In particular, the
 functional is not cyclic in
-@tex $D \ne 4$
+@tex
+$D \ne 4$
 @end tex
 @ifnottex
 @math{D != 4}
@@ -3253,7 +3254,8 @@ expressions containing @samp{gamma5}, so it's not a proper trace. This
 @cite{The Role of gamma5 in Dimensional Regularization} (@ref{Bibliography}).
 
 The value of the trace itself is also usually different in 4 and in
-@tex $D \ne 4$
+@tex
+$D \ne 4$
 @end tex
 @ifnottex
 @math{D != 4}
@@ -3326,15 +3328,16 @@ You can use this to compare two expressions or for further simplifications:
 @subsubsection A generic Clifford algebra
 
 A generic Clifford algebra, i.e. a
-@tex $2^n$
+@tex
+$2^n$
 @end tex
 @ifnottex
 2^n
 @end ifnottex
-dimensional algebra with
-generators 
-@tex $e_k$
-@end tex 
+dimensional algebra with generators
+@tex
+$e_k$
+@end tex
 @ifnottex
 e_k
 @end ifnottex
index 2617545d8b9a5d2596477d3195603ef4f4c5c297..b9f47938ce2be09b897d230f23af262ea6de666a 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's sums of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 53f31ce346575651a0716b042ace30cb9125b981..f7c64e08cf825239be4ccbe2357f8bf96a18d835 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's sums of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 76e377e687e7ef40eefba5eafd6fd04a3f227311..82d2b68b3fd0c799f3d343986a4b43cb50dfb5d1 100644 (file)
@@ -3,7 +3,7 @@
  *  Archiving of GiNaC expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0262bd1d7b15ab816e26e97fc42637540707a181..8b7a3e4a566b971701ff35f346dcab34133b9f4c 100644 (file)
@@ -3,7 +3,7 @@
  *  Archiving of GiNaC expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c6e97917d3e0ecb0118a4a4cadbffe4eb3fbb6d0..7bac17694c477366ad64adc4fd5970e1a2092364 100644 (file)
@@ -3,7 +3,7 @@
  *  Assertion macro definition. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index dd70d7e066e6df9d788d3ee352ff5c42eab5e903..b5f97cda64c2e6734c5b517ee9d0a75ad2c65fa7 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's ABC. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index fd7c170a75ada5f96a848334c7e459770340b990..850bc91dad771dd40baf84a81eb94bf444eeef0d 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's ABC. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e1057dda8114146ca51e22ee52fa483cc5f09aa6..1db156200b2c34ddc6bd5fe277a1eeb3efd3cbc6 100644 (file)
@@ -3,7 +3,7 @@
  *  Helper templates to provide per-class information for class hierarchies. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c7996e9d31734d9b1d35b3f5ee0cf34075b7469e..2cf0facf015ab00375fa3e334fbb80573bcf1f5b 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's clifford algebra (Dirac gamma) objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5491516c63d0e5acd9a83258014b5a582968c126..0b78c49790311b5bb6c732d50615f92c79e301cb 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's clifford algebra (Dirac gamma) objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -306,7 +306,7 @@ ex remove_dirac_ONE(const ex & e, unsigned char rl = 0, unsigned options = 0);
  *  if e contains at least one, otherwise returns -1 
  *
  *  @param e Expression to be processed
- *  @ignore_ONE defines if clifford_ONE should be ignored in the search*/
+ *  @param ignore_ONE defines if clifford_ONE should be ignored in the search */
 int clifford_max_label(const ex & e, bool ignore_ONE = false);
 
 /** Calculation of the norm in the Clifford algebra. */
@@ -321,9 +321,14 @@ ex clifford_inverse(const ex & e);
  *  @param mu Index (must be of class varidx or a derived class)
  *  @param metr Metric (should be indexed, tensmetric or a derived class, or a matrix)
  *  @param rl Representation label
- *  @param e Clifford unit object
  *  @return Clifford vector with given components */
 ex lst_to_clifford(const ex & v, const ex & mu,  const ex & metr, unsigned char rl = 0);
+
+/** List or vector conversion into the Clifford vector.
+ *
+ *  @param v List or vector of coordinates
+ *  @param e Clifford unit object
+ *  @return Clifford vector with given components */
 ex lst_to_clifford(const ex & v, const ex & e);
 
 /** An inverse function to lst_to_clifford(). For given Clifford vector extracts
index a895ac08e839497883d6333eabcbb5c6511a6c10..accdccdb2b45b901996a5dd230635e6c944c7af0 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's color (SU(3) Lie algebra) objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0738a8eb2bc79b41991b95eb35b61ff98e532049..828b8c0b8d31a43eb7bba1a1d814e52593d827a6 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's color (SU(3) Lie algebra) objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 586ac0297a786fea39ae2611101009f0f1ad1337..e9682794d05a67d3e9f0bc3007f374902b8d4a42 100644 (file)
@@ -3,7 +3,7 @@
  *  Definition of optimizing macros. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 8b8f94092da214a50b452abe7bb8cdb51fdb0c92..7bdd244bac74308f4412ae1381162d084e0a41dd 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's constant types and some special constants. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 2b9bbc7304c280fb0c48b447d13c495acb48ef0c..55ff5e5d8556cb66c1387c67cfb5933316d9eafd 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's constant types and some special constants. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0133e60b8807b874f85ac2f91769008c6d1119f7..9082971011afed0acefffe706dd2d8ffd4250ee6 100644 (file)
@@ -3,7 +3,7 @@
  *  Wrapper template for making GiNaC classes out of STL containers. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 1080062f9de07ef4295bdb035b01d587a9fc1356..a052b7223a745d65898cdf8eb7dd7687b70df32b 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -70,6 +70,8 @@ void ex::dbgprinttree() const
        bp->dbgprinttree();
 }
 
+/** Expand an expression.
+ *  @param options  see GiNaC::expand_options */
 ex ex::expand(unsigned options) const
 {
        if (options == 0 && (bp->flags & status_flags::expanded)) // The "expanded" flag only covers the standard options; someone might want to re-expand with different options
index dd06ad53522e9b5f7346d496122e6168419ba523..5381a38aad85fa2213bfd28ffadf6cacdf496a69 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's light-weight expression handles. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 3f74d1ed1d051961723301c62d633fbd7d413168..513c19a7058a164da7b097f44326fe0d5de4bd0f 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 18d6d2850c6d49e6d0c8359b363eda57b893516f..a2ad9b9c42e55de83159b126ee1999abf582a4de 100644 (file)
@@ -4,7 +4,7 @@
  *  fast numerical integration. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -65,7 +65,8 @@ void compile_ex(const ex& expr, const symbol& sym, FUNCP_1P& fp, const std::stri
  * C code equivalent in double precision. The function pointer has type FUNCP_2P.
  *
  * @param expr Expression to be compiled
- * @param sym Symbol from the expression to become the function parameter
+ * @param sym1 Symbol from the expression to become the first function parameter
+ * @param sym2 Symbol from the expression to become the second function parameter
  * @param fp Returned function pointer
  * @param filename Name of the intermediate source code and so-file. If
  * supplied, these intermediate files will not be deleted
@@ -76,8 +77,8 @@ void compile_ex(const ex& expr, const symbol& sym1, const symbol& sym2, FUNCP_2P
  * Takes an expression and produces a function pointer to the compiled and linked
  * C code equivalent in double precision. The function pointer has type FUNCP_CUBA.
  *
- * @param expr Expression to be compiled
- * @param sym Symbol from the expression to become the function parameter
+ * @param exprs List of expression to be compiled
+ * @param syms Symbols from the expression to become the function parameters
  * @param fp Returned function pointer
  * @param filename Name of the intermediate source code and so-file. If
  * supplied, these intermediate files will not be deleted
index eeb74c611769a62f42a0ffe7c32589303192a216..d30dda882ec304ccb750c24acf54109e35f5b621 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of expression pairs (building blocks of expairseq). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0e6b17916b319118b3ed39b328bad71950145854..452a6f2c672f502eae3483cf12aff7dfc6726b52 100644 (file)
@@ -3,7 +3,7 @@
  *  Definition of expression pairs (building blocks of expairseq). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index bfcbac712e6f600640667138a808b1e30d4f3b6b..cef087153c5fb61facc66ce1e95df40e7e1187d5 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of sequences of expression pairs. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 93794c49630947cfd9ae281ecffc0b33113179b3..7554369be230375aab4a95fae9644001df3e581e 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to sequences of expression pairs. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 7b472c78a84c9127378132bfb019a2f326abb1a3..fb02be1aefa5874fce96ea0463381d171cac09d8 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's exprseq. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c71029642ec51c71ebbeeebcdf1cecadc8d17bd7..a0381ec9c4758030917ed1755535676aae0ff405 100644 (file)
@@ -3,7 +3,7 @@
  *  Definition of GiNaC's exprseq. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a07a42b099884911086f348847ad8626ef12af38..efe438eae8c59e658cd7553d2867aa42c71556b3 100644 (file)
@@ -33,7 +33,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -2380,8 +2380,7 @@ static ex factor_multivariate(const ex& poly, const exset& syms)
                copy_if(syms.begin(), syms.end(),
                        inserter(syms_wox, syms_wox.end()), [x](const ex& y){ return y != x; });
 
-               factorization_ctx ctx = {.poly = poly, .x = x,
-                                        .syms_wox = syms_wox};
+               factorization_ctx ctx{poly, x, syms_wox};
 
                // make polynomial primitive
                poly.unitcontprim(x, ctx.unit, ctx.cont, ctx.pp);
@@ -2394,7 +2393,7 @@ static ex factor_multivariate(const ex& poly, const exset& syms)
                ctx.vn = ctx.pp.collect(x).lcoeff(x);
                ctx.vnlst = put_factors_into_vec(factor(ctx.vn));
 
-               ctx.modulus = (ctx.vnlst.size() > 3) ? ctx.vnlst.size() : 3;
+               ctx.modulus = (ctx.vnlst.size() > 3) ? ctx.vnlst.size() : numeric(3);
 
                ctx_in_x.push_back(ctx);
        }
index 798ef41c9d43cff3b6ee36f5e5c0afa59d450945..ccdb595e637aa95c9ea419973794fcead4b0382d 100644 (file)
@@ -3,7 +3,7 @@
  *  Polynomial factorization. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ class ex;
  *  functions or polynomials inside function arguments.
  *
  *  @param[in] poly    expression to factorize
- *  @param[in] option  options to influence the factorization
+ *  @param[in] options see GiNaC::factor_options
  *  @return            factorized expression
  */
 extern ex factor(const ex& poly, unsigned options = 0);
index b7eb6b959898be7b707e7fcd1c00523a8d563503..ad65225aa7d8fd1ba6f322ba379706f4e9341cca 100644 (file)
@@ -4,7 +4,7 @@
  *  somewhat obsolete (most of this can be replaced by exceptions). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ed847f89683550b8dc38fedc0cf583a00dbf8eaa..4afee2f215a9424f1bd9dda330b547b343ab4aa7 100644 (file)
@@ -4,7 +4,7 @@
  *  somewhat obsolete (most of this can be replaced by exceptions). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 259a5755a3d3ef535c97d4f01dfd0d5e8dea0a9f..1bc31063b2421205c6d7a62f3c08117ba22dee56 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of abstract derivatives of functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 6b92692a463fc11fe0c8351bb3f767a4da36924e..e213e8dd28f0e3b3abe5c25bf238437557f07498 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to abstract derivatives of functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 2fba1a656c89596bd5d46036f6be5b3d6e7840a0..b1425b2f2ee74f88bbdcb4e4f1c762d3c3f41600 100644 (file)
@@ -3,7 +3,7 @@
  *  Collection of all flags used through the GiNaC framework. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 04c94e19f5cf4908cbdb38d99397a02d43df1bc4..115845e156942a924d51794f3c8b0ad6a5db006d 100644 (file)
@@ -7,7 +7,7 @@
  *  Please do not modify it directly, edit function.cppy instead!
  *  function.py options: maxargs=@maxargs@
  *
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4d6aa000ab7c3e19266b7fd64ef5449f5a0b1bca..aa1d6ceef611a3423736afb66295252ffa24ecbf 100644 (file)
@@ -6,7 +6,7 @@
  *  This file was generated automatically from function.hppy.
  *  Please do not modify it directly, edit function.hppy instead!
  *
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 7750329920a0753d0611b66c34b3d3e0a92520c5..9840b001d79d611aee155803ccc1ea5d03d7a1f4 100644 (file)
@@ -3,7 +3,7 @@
  *  This include file includes all other public GiNaC headers. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index cb3a277c182018421ebf14dfd5690e7f89516d3d..ce77509e9d6f0b1dedde27becbbfdca1dd806ff1 100644 (file)
@@ -3,7 +3,7 @@
  *  Replacement for map<> using hash tables. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c56ea8ba1961088da7dab60a900db69d590b8ec4..479481f1ba3393cb63da395d5a8627193296059d 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's indices. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c327a320cc0a59b4cea31725a7a9b5a1ddb2589e..beb137d12d967f4c940825ec8ace48d392b210ef 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's indices. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -41,8 +41,7 @@ public:
        /** Construct index with given value and dimension.
         *
         *  @param v Value of index (numeric or symbolic)
-        *  @param dim Dimension of index space (numeric or symbolic)
-        *  @return newly constructed index */
+        *  @param dim Dimension of index space (numeric or symbolic) */
        explicit idx(const ex & v, const ex & dim);
 
        // functions overriding virtual functions from base classes
@@ -119,8 +118,7 @@ public:
         *
         *  @param v Value of index (numeric or symbolic)
         *  @param dim Dimension of index space (numeric or symbolic)
-        *  @param covariant Make covariant index (default is contravariant)
-        *  @return newly constructed index */
+        *  @param covariant Make covariant index (default is contravariant) */
        varidx(const ex & v, const ex & dim, bool covariant = false);
 
        // functions overriding virtual functions from base classes
@@ -169,8 +167,7 @@ public:
         *  @param v Value of index (numeric or symbolic)
         *  @param dim Dimension of index space (numeric or symbolic)
         *  @param covariant Make covariant index (default is contravariant)
-        *  @param dotted Make covariant dotted (default is undotted)
-        *  @return newly constructed index */
+        *  @param dotted Make covariant dotted (default is undotted) */
        spinidx(const ex & v, const ex & dim = 2, bool covariant = false, bool dotted = false);
 
        // functions overriding virtual functions from base classes
index 034f9f46e66415b3f8b18b89228fd1531ed3d039..1c3b51467438e08479775b49c36230cf259ecf76 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's indexed expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 26ac2c343999d47e873b3969b44829f16f1eb36a..c66bcea6ff17deae35edf233834780fdc1d95bd6 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's indexed expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -48,23 +48,20 @@ class indexed : public exprseq
 public:
        /** Construct indexed object with no index.
         *
-        *  @param b Base expression
-        *  @return newly constructed indexed object */
+        *  @param b Base expression */
        indexed(const ex & b);
 
        /** Construct indexed object with one index. The index must be of class idx.
         *
         *  @param b Base expression
-        *  @param i1 The index
-        *  @return newly constructed indexed object */
+        *  @param i1 The index */
        indexed(const ex & b, const ex & i1);
 
        /** Construct indexed object with two indices. The indices must be of class idx.
         *
         *  @param b Base expression
         *  @param i1 First index
-        *  @param i2 Second index
-        *  @return newly constructed indexed object */
+        *  @param i2 Second index */
        indexed(const ex & b, const ex & i1, const ex & i2);
 
        /** Construct indexed object with three indices. The indices must be of class idx.
@@ -72,8 +69,7 @@ public:
         *  @param b Base expression
         *  @param i1 First index
         *  @param i2 Second index
-        *  @param i3 Third index
-        *  @return newly constructed indexed object */
+        *  @param i3 Third index */
        indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3);
 
        /** Construct indexed object with four indices. The indices must be of class idx.
@@ -82,8 +78,7 @@ public:
         *  @param i1 First index
         *  @param i2 Second index
         *  @param i3 Third index
-        *  @param i4 Fourth index
-        *  @return newly constructed indexed object */
+        *  @param i4 Fourth index */
        indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3, const ex & i4);
 
        /** Construct indexed object with two indices and a specified symmetry. The
@@ -92,8 +87,7 @@ public:
         *  @param b Base expression
         *  @param symm Symmetry of indices
         *  @param i1 First index
-        *  @param i2 Second index
-        *  @return newly constructed indexed object */
+        *  @param i2 Second index */
        indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2);
 
        /** Construct indexed object with three indices and a specified symmetry.
@@ -103,8 +97,7 @@ public:
         *  @param symm Symmetry of indices
         *  @param i1 First index
         *  @param i2 Second index
-        *  @param i3 Third index
-        *  @return newly constructed indexed object */
+        *  @param i3 Third index */
        indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3);
 
        /** Construct indexed object with four indices and a specified symmetry. The
@@ -115,16 +108,14 @@ public:
         *  @param i1 First index
         *  @param i2 Second index
         *  @param i3 Third index
-        *  @param i4 Fourth index
-        *  @return newly constructed indexed object */
+        *  @param i4 Fourth index */
        indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3, const ex & i4);
 
        /** Construct indexed object with a specified vector of indices. The indices
         *  must be of class idx.
         *
         *  @param b Base expression
-        *  @param iv Vector of indices
-        *  @return newly constructed indexed object */
+        *  @param iv Vector of indices */
        indexed(const ex & b, const exvector & iv);
 
        /** Construct indexed object with a specified vector of indices and
@@ -132,8 +123,7 @@ public:
         *
         *  @param b Base expression
         *  @param symm Symmetry of indices
-        *  @param iv Vector of indices
-        *  @return newly constructed indexed object */
+        *  @param iv Vector of indices */
        indexed(const ex & b, const symmetry & symm, const exvector & iv);
 
        // internal constructors
index f8ec39a3035aabdf64e4c6516946de407d7c56f8..b72d81bdfe8364c37f14df1e7a45558edfe5ace5 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's initially known functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1021,6 +1021,20 @@ static ex Order_imag_part(const ex & x)
        return Order(x).hold();
 }
 
+static ex Order_power(const ex & x, const ex & e)
+{
+       // Order(x)^e -> Order(x^e) for positive integer e
+       if (is_exactly_a<numeric>(e) && e.info(info_flags::posint))
+               return Order(pow(x, e));
+       // NB: For negative exponents, the above could be wrong.
+       // This is because series() produces Order(x^n) to denote the order where
+       // it gave up. So, Order(x^n) can also be an x^(n+1) term if the x^n term
+       // vanishes. In this situation, 1/Order(x^n) can also be a x^(-n-1) term.
+       // Transforming it to Order(x^-n) would miss that.
+
+       return power(Order(x), e).hold();
+}
+
 static ex Order_expl_derivative(const ex & arg, const symbol & s)
 {
        return Order(arg.diff(s));
@@ -1032,7 +1046,8 @@ REGISTER_FUNCTION(Order, eval_func(Order_eval).
                          expl_derivative_func(Order_expl_derivative).
                          conjugate_func(Order_conjugate).
                          real_part_func(Order_real_part).
-                         imag_part_func(Order_imag_part));
+                         imag_part_func(Order_imag_part).
+                         power_func(Order_power));
 
 //////////
 // Solve linear system
index cc64debbb5c07536a9534658b899203119599492..c49e8519cde033d6f90f23d9b74e83c4a82b8bea 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's initially known functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 33d4bc10e9cb05c0148b22413aafe934985ab7f9..4ea7bf2e6acd02803681f359ac874ead65a03770 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index bb003342058536d69de04e09f2c8dd7e6aeb33df..d4b425fb003d904b42c168b973c375638c39ba10 100644 (file)
@@ -4,7 +4,7 @@
  *  some related stuff. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index edaf486cb0a8567b15e0e005ebf1168e6116c2ef..e69cdb4014612f9cdbacc8389a4b17db244c7890 100644 (file)
@@ -47,7 +47,7 @@
  */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d9dd4a2643ccff4b06b330eb92e11246bba0b05d..9a2a0b6c402bc6f666637ccadbd9c1331ec66b95 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -149,7 +149,6 @@ static ex exp_power(const ex & x, const ex & a)
 static bool exp_info(const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
        case info_flags::real:
                return x.info(inf);
@@ -389,7 +388,6 @@ static ex log_conjugate(const ex & x)
 static bool log_info(const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
                return x.info(inf);
        case info_flags::real:
@@ -512,7 +510,6 @@ static ex sin_conjugate(const ex & x)
 static bool trig_info(const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
        case info_flags::real:
                return x.info(inf);
@@ -834,7 +831,6 @@ static ex asin_conjugate(const ex & x)
 static bool asin_info(const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
                return x.info(inf);
        default:
@@ -1039,7 +1035,6 @@ static ex atan_conjugate(const ex & x)
 static bool atan_info(const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
        case info_flags::real:
                return x.info(inf);
@@ -1158,7 +1153,6 @@ static ex atan2_deriv(const ex & y, const ex & x, unsigned deriv_param)
 static bool atan2_info(const ex & y, const ex & x, unsigned inf)
 {
        switch (inf) {
-       case info_flags::numeric:
        case info_flags::expanded:
        case info_flags::real:
                return y.info(inf) && x.info(inf);
index d35df26ca45027800084f21b8a021d4d93f68ab9..db5a46c65e9de8efc8cedfac0adfd9cb0e04f44a 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic  integral. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 647637ff740413182a212d7e05a54d38b897aa46..91b078de247334cb1c304f07f82bb4c81f6f2fd3 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symbolic  integral. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 31342e27005f9065b0f537b5ae2fa93579463422..d224bd8b0ab5902afa1921eb8609251eae7ce692 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's integration kernels for iterated integrals. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c4434c8535e21ee23710ace23da99a203ec2d466..20d6fb7f9f0f26e034df2b77413f35c78699f514 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's integration kernels for iterated integrals. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e9f636cd20691237faaaa9f4e56747c248c676ef..73bcc700f3284b6be3389d62c7c3162a03b9c41b 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's lst. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4395c8036951ecefe530a42a400ea2e885c5c106..7b8c6f1ae8cb81f4c34d3f379e2f7f1a9a641b95 100644 (file)
@@ -3,7 +3,7 @@
  *  Definition of GiNaC's lst. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index ce0e105cc24570fbbdb6d006bf3da2fbe5b9f1d3..13e7e80a71cc2463b1dbae4fd842f763bf9ef764 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of symbolic matrices */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 29e9159fdf98cc088eb90515d9e485722b6d229b..6be9ba4e9000c7dc7c8e8cb913a76da02061de83 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to symbolic matrices */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a347ba3f48ab05431af7dfb564bd290580f36b3e..a8941692ca3cbb4250e2dbe578b85a02c434943a 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 3bad3b3fa70b31cce6180e69efe75dab5f35c7ec..14336d3dcbb03df925183c8b653ca8232e64079b 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 811875b98cd871d606f724f07dea4dc5e9933783..5f64851a5920e52dd5a8fd7dd3e6540e9fb2c1a3 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's non-commutative products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 16780f4772ec7c44c39f56a83de9169c543967d5..d66053f8f2b6c10534941f2aaeda67d0522e16a5 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's non-commutative products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 8b2bba479b0e9ba3ef0cdb720a2b7fe253b784ad..8ebac6ce0a993d8e4ffe4b24b65da607ae438408 100644 (file)
@@ -6,7 +6,7 @@
  *  computation, square-free factorization and rational function normalization. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1428,6 +1428,7 @@ static ex gcd_pf_mul(const ex& a, const ex& b, ex* ca, ex* cb);
  *  @param cb pointer to expression that will receive the cofactor of b, or nullptr
  *  @param check_args  check whether a and b are polynomials with rational
  *         coefficients (defaults to "true")
+ *  @param options  see GiNaC::gcd_options
  *  @return the GCD as a new expression */
 ex gcd(const ex &a, const ex &b, ex *ca, ex *cb, bool check_args, unsigned options)
 {
index 696b8ed957e4a5d14e8af8088382e86178c1064e..ef02ae8bc4c0b1380cf811c15b37698883d5165b 100644 (file)
@@ -6,7 +6,7 @@
  *  computation, square-free factorization and rational function normalization. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c643d0415af469eecdc290885ba2149bce556ead..900cac17438460544878c9ee4ff4996fae5df8dc 100644 (file)
@@ -7,7 +7,7 @@
  *  of special functions or implement the interface to the bignum package. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -2138,8 +2138,10 @@ const numeric doublefactorial(const numeric &n)
 
 /** The Binomial coefficients.  It computes the binomial coefficients.  For
  *  integer n and k and positive n this is the number of ways of choosing k
- *  objects from n distinct objects.  If n is negative, the formula
- *  binomial(n,k) == (-1)^k*binomial(k-n-1,k) is used to compute the result. */
+ *  objects from n distinct objects.  If n is a negative integer, the formula
+ *  binomial(n,k) == (-1)^k*binomial(k-n-1,k) (if k>=0)
+ *  binomial(n,k) == (-1)^(n-k)*binomial(-k-1,n-k) (otherwise)
+ *  is used to compute the result. */
 const numeric binomial(const numeric &n, const numeric &k)
 {
        if (n.is_integer() && k.is_integer()) {
@@ -2149,7 +2151,10 @@ const numeric binomial(const numeric &n, const numeric &k)
                        else
                                return *_num0_p;
                } else {
-                       return _num_1_p->power(k)*binomial(k-n-(*_num1_p),k);
+                       if (k.is_nonneg_integer())
+                               return _num_1_p->power(k)*binomial(k-n-(*_num1_p), k);
+                       else
+                               return _num_1_p->power(n-k)*binomial(-k-(*_num1_p), n-k);
                }
        }
        
index 1223f4a8c82fd6c6e4ec4a4b6cbf7ced8e7b46b1..6aff6b35a26d32b5ac9c5d96add65620997bb896 100644 (file)
@@ -3,7 +3,7 @@
  *  Makes the interface to the underlying bignum package available. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0f90c8b9650f7d331412f59948ca693918ed1f0f..9341d277c3e7c8957b162b49f9c8798054a680c3 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's overloaded operators. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 30f7db23a9332b757fd91dcdd75d3941e4f7ad1a..45062aedb6d6130da8c2533d757df42d1219fa92 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's overloaded operators. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 931f35006ad8bb7ea6e98567f7527bd809396db1..ca5a63a63c1024d97c1bc0250dee41d0b6378af9 100644 (file)
@@ -3,7 +3,7 @@
  *  Debugging facilities for parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f76e483e059ce0e691852659b51f4d0b4d6eeb75..defcc87af59ecb02dc26ce1fb27ea222a2de5a2c 100644 (file)
@@ -4,7 +4,7 @@
  **/
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -69,32 +69,20 @@ private:
        registered_functions_hack& operator=(const registered_functions_hack&);
 };
 
-// Encode an integer into a pointer to a function. Since functions
-// are aligned (the minimal alignment depends on CPU architecture)
-// we can distinguish between pointers and integers.
-static reader_func encode_serial_as_reader_func(unsigned serial)
-{
-       uintptr_t u = (uintptr_t)serial;
-       u = (u << 1) | (uintptr_t)1;
-       reader_func ptr = (reader_func)((void *)u);
-       return ptr;
-}
-
 const prototype_table& get_default_reader()
 {
-       using std::make_pair;
        static bool initialized = false;
        static prototype_table reader;
        if (!initialized) {
-               
-               reader[make_pair("sqrt", 1)] = sqrt_reader;
-               reader[make_pair("pow", 2)] = pow_reader;
-               reader[make_pair("power", 2)] = power_reader;
-               reader[make_pair("lst", 0)] = lst_reader;
+
+               reader.insert({{"sqrt", 1}, reader_func(sqrt_reader)});
+               reader.insert({{"pow", 2}, reader_func(pow_reader)});
+               reader.insert({{"power", 2}, reader_func(power_reader)});
+               reader.insert({{"lst", 0}, reader_func(lst_reader)});
                unsigned serial = 0;
                for (auto & it : registered_functions_hack::get_registered_functions()) {
-                       prototype proto = make_pair(it.get_name(), it.get_nparams());
-                       reader[proto] = encode_serial_as_reader_func(serial);
+                       reader.insert({{it.get_name(), it.get_nparams()},
+                                      reader_func(serial)});
                        ++serial;
                }
                initialized = true;
@@ -104,15 +92,14 @@ const prototype_table& get_default_reader()
 
 const prototype_table& get_builtin_reader()
 {
-       using std::make_pair;
        static bool initialized = false;
        static prototype_table reader;
        if (!initialized) {
-               
-               reader[make_pair("sqrt", 1)] = sqrt_reader;
-               reader[make_pair("pow", 2)] = pow_reader;
-               reader[make_pair("power", 2)] = power_reader;
-               reader[make_pair("lst", 0)] = lst_reader;
+
+               reader.insert({{"sqrt", 1}, reader_func(sqrt_reader)});
+               reader.insert({{"pow", 2}, reader_func(pow_reader)});
+               reader.insert({{"power", 2}, reader_func(power_reader)});
+               reader.insert({{"lst", 0}, reader_func(lst_reader)});
                enum {
                        log,
                        exp,
@@ -146,8 +133,8 @@ const prototype_table& get_builtin_reader()
                auto it = registered_functions_hack::get_registered_functions().begin();
                unsigned serial = 0;
                for ( ; serial<NFUNCTIONS; ++it, ++serial ) {
-                       prototype proto = make_pair(it->get_name(), it->get_nparams());
-                       reader[proto] = encode_serial_as_reader_func(serial);
+                       reader.insert({{it->get_name(), it->get_nparams()},
+                                      reader_func(serial)});
                }
                initialized = true;
        }
index 3aec4a4433a0a1ed95c2db352cc618589feaa2c7..18576aff631c6bbf5004f42b6a46234bf9219a04 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's lexer. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b7fc687da43c1d9c201d4c725cc06598c9e4bcec..436fe843f531c2a101df1e0493984e2f8fe721d4 100644 (file)
@@ -3,7 +3,7 @@
  *  The lexer. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 1b3d325484244343f77c7e4b162f529fa969a0d4..7459bdfdfe87d3e79191af0d34cfc379d8981b29 100644 (file)
@@ -3,7 +3,7 @@
  *  Code to deal with binary operators. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -114,6 +114,18 @@ ex parser::parse_binop_rhs(int expr_prec, ex& lhs)
        }
 }
 
+/// unary_expr: [+-] expression
+ex parser::parse_unary_expr()
+{
+       // Parse a binary expression with the priority of exponentiation
+       // or higher. Ignore the overall sign, because parse_primary()
+       // handles it for us.
+       get_next_tok(); // Skip [+-]
+       ex lhs = parse_primary();
+       ex e = parse_binop_rhs(get_tok_prec('^'), lhs);
+       return e;
+}
+
 extern const numeric* _num_1_p;
 
 static ex make_minus_expr(const exvector& args)
@@ -137,6 +149,16 @@ static ex make_divide_expr(const exvector& args)
        return dynallocate<mul>(args[0], rest);
 }
 
+static ex make_power_expr(const exvector& args)
+{
+       size_t n = args.size();
+       ex p = pow(args[n - 2], args[n - 1]);
+       for (size_t i = n - 2; i > 0; i--) {
+               p = pow(args[i - 1], p);
+       }
+       return p;
+}
+
 static ex make_binop_expr(const int binop, const exvector& args)
 {
        switch (binop) {
@@ -149,11 +171,7 @@ static ex make_binop_expr(const int binop, const exvector& args)
                case '/':
                        return make_divide_expr(args);
                case '^':
-                       if (args.size() != 2)
-                               throw std::invalid_argument(
-                                               std::string(__func__) 
-                                               + ": power should have exactly 2 operands");
-                       return pow(args[0], args[1]);
+                       return make_power_expr(args);
                default:
                        throw std::invalid_argument(
                                        std::string(__func__) 
index 482c82450238c6202b1069119b09bd2fa0df8c24..8d0298162021a0f6ec6c37d11dbd19b214917fff 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of the parser context. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b543b354886ec96e289eaf974ad0beaa7ad9dcc8..015ca13517dbce52410fa67a8317030e5a3ce30f 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to parser context. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -63,7 +63,21 @@ typedef std::pair<std::string, std::size_t> prototype;
  * The parser uses (an associative array of) such functions to construct
  * (GiNaC) classes and functions from a sequence of characters.
  */
-typedef ex (*reader_func)(const exvector& args);
+class reader_func {
+       enum { FUNCTION_PTR, GINAC_FUNCTION };
+public:
+       reader_func(ex (*func_)(const exvector& args))
+               : type(FUNCTION_PTR), serial(0), func(func_) {}
+       reader_func(unsigned serial_)
+               : type(GINAC_FUNCTION), serial(serial_), func(nullptr) {}
+       ex operator()(const exvector& args) const;
+private:
+       unsigned type;
+       unsigned serial;
+       ex (*func)(const exvector& args);
+};
+
+
 
 /**
  * Prototype table.
index 24f5136afb474e624022d157a0a73f62fafb4811..a7288c32a6b3e614c6b06adc910a5fff2fcb9e99 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -27,6 +27,7 @@
 #include "mul.h"
 #include "constant.h"
 #include "function.h"
+#include "operators.h"
 
 #include <cstdint> // for uintptr_t
 #include <sstream>
 
 namespace GiNaC {
 
-// <KLUDGE>
-// Find out if ptr is a pointer to a function or a specially crafted integer.
-// It's possible to distinguish between these because functions are aligned.
-// Returns true if ptr is a pointer and false otherwise.
-static bool decode_serial(unsigned& serial, const reader_func ptr)
+ex reader_func::operator()(const exvector& args) const
 {
-       uintptr_t u = (uintptr_t)(void *)ptr;
-       if (u & 1) {
-               u >>= 1;
-               serial = (unsigned)u;
-               return false;
-       }
-       return true;
-}
-
-// Figures out if ptr is a pointer to function or a serial of GiNaC function.
-// In the former case calls that function, in the latter case constructs
-// GiNaC function with corresponding serial and arguments.
-static ex dispatch_reader_fcn(const reader_func ptr, const exvector& args)
-{
-       unsigned serial = 0; // dear gcc, could you please shut up?
-       bool is_ptr = decode_serial(serial, ptr);
-       if (is_ptr)
-               return ptr(args);
-       else
+       switch (type) {
+       case FUNCTION_PTR:
+               return func(args);
+       case GINAC_FUNCTION:
                return function(serial, args);
+       default:
+               abort();
+       }
 }
-// </KLUDGE>
-
 
 /// identifier_expr:  identifier |  identifier '(' expression* ')'
 ex parser::parse_identifier_expr()
@@ -92,16 +75,14 @@ ex parser::parse_identifier_expr()
        }
        // Eat the ')'.
        get_next_tok();
-       prototype the_prototype = make_pair(name, args.size());
-       auto reader = funcs.find(the_prototype);
+       auto reader = funcs.find({name, args.size()});
        if (reader == funcs.end()) {
                Parse_error_("no function \"" << name << "\" with " <<
                             args.size() << " arguments");
        }
        // reader->second might be a pointer to a C++ function or a specially
        // crafted serial of a GiNaC::function.
-       ex ret = dispatch_reader_fcn(reader->second, args);
-       return ret;
+       return reader->second(args);
 }
 
 /// paren_expr:  '(' expression ')'
@@ -144,27 +125,6 @@ ex parser::parse_lst_expr()
        return list;
 }
 
-extern const ex _ex0;
-
-/// unary_expr: [+-] expression
-ex parser::parse_unary_expr()
-{
-       // Unlike most other parse_* method this one does NOT consume
-       // current token so parse_binop_rhs() knows what kind of operator
-       // is being parsed.
-       
-       // There are different kinds of expressions which need to be handled:
-       // -a+b 
-       // -(a) 
-       // +a
-       // +(a)
-       // Delegate the work to parse_binop_rhs(), otherwise we end up
-       // duplicating it here. 
-       ex lhs = _ex0; // silly trick
-       ex e = parse_binop_rhs(0, lhs);
-       return e;
-}
-
 /// primary: identifier_expr | number_expr | paren_expr | unary_expr 
 ex parser::parse_primary() 
 {
@@ -178,6 +138,7 @@ ex parser::parse_primary()
                case '{': 
                         return parse_lst_expr();
                case '-':
+                        return -parse_unary_expr();
                case '+':
                         return parse_unary_expr();
                case lexer::token_type::literal:
@@ -225,7 +186,7 @@ ex parser::operator()(std::istream& input)
        get_next_tok();
        ex ret = parse_expression();
        // parse_expression() stops if it encounters an unknown token.
-       // This is not a bug: since the parser is recursive checking
+       // This is not a bug: since the parser is recursive, checking
        // whether the next token is valid is responsibility of the caller.
        // Hence make sure nothing is left in the stream:
        if (token != lexer::token_type::eof)
index 07835c0060dddb6c0f69a69ff29eb2ec62c18c94..08fc6c17a5b1cb06c499a764bf136fba56029e5e 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to the parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index bf7cc82834d1891d5726d7c45e3676bd43633122..030a301fa4424dc1d750a5cc029bd61c70306992 100644 (file)
@@ -3,7 +3,7 @@
  * Parser interface compatible with the old (bison/flex based) parser. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9a584c12866859afd84b4d4e46a4146e23c3691e..ad79785c372f869673a038fd53832e241a0c8982 100644 (file)
@@ -3,7 +3,7 @@
  *  Chinese remainder algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9a686f6fdfc653dbd2c7655a9b618d4df3392d6b..460b05635cbc290408c38f5e2dd0845399b2f57a 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GCD functions using Chinese remainder algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 6dc46b4123def45a1dec51ec8945888c3e041eae..1200563722fd89c4db64ae95609ac9885c31cf32 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 6546bf4f8d3796470e7527535ba67b9f8838c728..82293a13fc61be0dec3b1922c804eaafcac1f104 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to utility functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index dc0420039798157c6e843889a77867e3405d122a..b01e71759a8c7c926230318d71f3739c5612ed95 100644 (file)
@@ -3,7 +3,7 @@
  *  Garner's algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4c172d2cd3ad2ca1ac1c63e4084e68bfd8b84bd4..3b3672825022a80ca9027d5006de4fd16e4390ee 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to Garner's algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index dcd29b7619cdc748bd7f1915ac500f21f61a166f..5f0eecd6876374ba9e7c0a356d8549ef7360ef82 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility macros and functions for debugging. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9126b7b9cbe66461a6e5414722cf2852b786e51a..5d9d4acb4c522d192de9749ea72b7ddcad2ed35e 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of polynomial division in Z/Zp. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 95ac4ad81146c779159b3e46108ee19d68e31133..49c2401c4815df2997687cf48582eaf056d5ad3a 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to polynomial division in Z/Zp. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 210dbb4265580f8f4cd72fb343568adf3982b86a..412e987cbef9fa434a3016ab5e3c77edfbb3aca3 100644 (file)
@@ -3,7 +3,7 @@
  *  Euclidean GCD and supporting functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 364c93e5c87230145604d0193a5a200e0dc564b5..c5c383fb85407c84882d39faf822370c8457e35d 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions for finding an evaluation point. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9c644d15d2362afb5f88960998158e7e92738442..1a3c127e3b0f03aed8e0a09030c7c04cf54b6c6d 100644 (file)
@@ -3,7 +3,7 @@
  *  Numerical evaluation of univariate polynomials. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 4c4ddeb76b3ebf04f00ddfbe7966c89bf4703ed3..8d00b65c47eb5f534245be165f41f9d754366d0e 100644 (file)
@@ -3,7 +3,7 @@
  *  GCD using Euclidean algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 23548639dddf5f6d047ed0ee711d0abceda8c4a5..2fa6f12a86df7c600ecb66c1a1740a899c5ea23e 100644 (file)
@@ -3,7 +3,7 @@
  *  Several GCD algorithms. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 536c97e1422954530520bec8c7ec58556397af4c..f00dbe90eb9486c2ea207510b4e64cd9b4951ebf 100644 (file)
@@ -3,7 +3,7 @@
  *  Heuristic GCD code. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 9bfea55fea65bb6cf07b87c2a328658aa18b3a61..ba4aa2a33e6779440ebb384d458f8d315ea005d3 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility function for interpolation. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index df69cf52ba20548bdfc67bdab24ddeb60c66400f..de007df3c56a9f660377d247574e50f736df001e 100644 (file)
@@ -3,7 +3,7 @@
  *  Chinese remainder algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d95c8cd8133b13997b29a66b4ca05a59d52a982d..abfbe151efb903bb0118bc3d7535a36c6ab07ef0 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of modular GCD. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index cde7315e1d55a9706223594c6d128ad52190f0b3..df17893998c5185d385495faaf9c68e328400278 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to modular GCD. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 7d009d784731a1c26cad3bdd8bf0194e03c72ca7..32a083d758f2092a4f92b8e6334921534a975aeb 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions for Newton interpolation. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f9081671fcdb31083c036d888d1e5ae94194dedb..c7b54d389bdd8fc450ac4c4393b439c145733af9 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions to normalize polynomials in a field. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b2a7007cd67b50bdbb404ec011695b13c3506b69..9186ebddfb0a174a7607a0d9a9449f7875188be4 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions to normalize polynomials in a field. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 5e81f6cf5b4d1229e2af4788dce5c63600d87a33..dc506bf3ad21387bfa2a455a2f51ad2d1c7123bc 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions to optimize the choice of variable for multivariate GCD. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 2bfd6f330b8f73bf58908e76c727253f1e18319f..5a7877b8f4813e200009fcb9dfa206d4ab02ce62 100644 (file)
@@ -4,7 +4,7 @@
  *  computations. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 811eae90585d93c549ca87bed0a4fcd6ccdf67e0..a0ba6f8848cdd85508c05dc082992e00ff507a02 100644 (file)
@@ -3,7 +3,7 @@
  *  GCD for polynomials in prime field. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0d9f4aef7dadd65c136ea696367e5ad6ffade992..c8363ac7a5e5499c0af68edfbdbf27074fb8534f 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GCD functions for polynomials over prime fields. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e52cd20eea1a12eac735273a8c0ddc39f0ee5312..f080ab8154155270bac8a43a35984785dd0e2a74 100644 (file)
@@ -3,7 +3,7 @@
  *  Chinese remainder algorithm. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f6923a4e7323828a3f66bfb8b62f5746c2516ffb..f301c111674d21ef69978293b76be1394576520d 100644 (file)
@@ -3,7 +3,7 @@
  *  Function to calculate the pseudo-remainder. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 50c01f220d0f092e3e218394e75ba790b7520d71..c9997e7e754e2c2c497848df80dc51d3ddc5e915 100644 (file)
@@ -3,7 +3,7 @@
  *  Factory for prime numbers. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 64c2df43baeafce3b741ea94ea73b8134255a9e1..315daa8ea45945c181c3a6083e4b7210512e785f 100644 (file)
@@ -3,7 +3,7 @@
  *  Function to find primitive part of a multivariate polynomial. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 7fed42ab6e8ab80030cea11d902739db4bb0b17f..41d5483ad45465eecd8e5c90b340eeadf1b1cee4 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions calculating remainders. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index b5a87cc9fd3f3fc8742a2859617a3bee1724a141..e4123230b0c9decd8688107f4c78f7e018f0c566 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions calculating remainders. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index c59badf4ffc5d9d7c311605f7887d2b3c5193da0..1a5b7a5df6897d2fc4dd56d887e9c0486a42d762 100644 (file)
@@ -3,7 +3,7 @@
  *  Functions for polynomial ring arithmetic. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 943da719819a9d2cb0996cdf42cd17c6e76874f8..f542a8d95c51ec95b50bc878e1ba0039271d70f0 100644 (file)
@@ -3,7 +3,7 @@
  *  Utility functions for modular arithmetic. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 62c52ca527551d6f368cb88dbd0cc7c6be537450..725a7ecb772a3bd2d76d6e6572691a27c24e7338 100644 (file)
@@ -3,7 +3,7 @@
  *  GCD function for univariate polynomials using PRS method. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index fd985277b7fe764b789488968087796d26fe2fe2..71bb671f01216daaeb90cbb452fcac178f73d7e8 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to polynomials with integer and modular coefficients. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a8fed1126fd8632a032f89c1be86eae170c74b91..d60bc963010c4dc793e2e6ac721f48678b30c484 100644 (file)
@@ -3,7 +3,7 @@
  *  Input/Output function for univariate polynomials. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 39782203d421b97bcb580e3546bfd66d0aa62b73..66d02fe57bc073fdaff0da3f9106562502317f36 100644 (file)
@@ -3,7 +3,7 @@
  *  Output operators for polynomials. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 88e5391788b4afa7fad4261247087e3eeae46765..c30c9547975139713fceb0aa4db1cf15f840859d 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic exponentiation (basis^exponent). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 62c9126ec97aead3629251a62df6db1d05476906..b893870f496a0a7e96ab1e139c8f32fa7b71afd4 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symbolic exponentiation (basis^exponent). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 3dee59e77ea0064585362d24a8d960e77d64422a..8f50db7060b07a881a2a29548f11666466bc63a5 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of helper classes for expression output. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 15c85f47b430fd81f79801098882d4561f55f956..0ded6227bf905a63264fbd5d1135dbe9487e8bf9 100644 (file)
@@ -3,7 +3,7 @@
  *  Definition of helper classes for expression output. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 54fc51bb04646b180539666ad08460997a1a4af0..b3ec633ec752cc0aaa1097a70d9e03fbb88fd67f 100644 (file)
@@ -4,7 +4,7 @@
  *  methods for series expansion. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -66,8 +66,7 @@ pseries::pseries() { }
  *  non-terminating series.
  *
  *  @param rel_  expansion variable and point (must hold a relational)
- *  @param ops_  vector of {coefficient, power} pairs (coefficient must not be zero)
- *  @return newly constructed pseries */
+ *  @param ops_  vector of {coefficient, power} pairs (coefficient must not be zero) */
 pseries::pseries(const ex &rel_, const epvector &ops_)
   : seq(ops_)
 {
@@ -993,8 +992,8 @@ ex pseries::power_const(const numeric &p, int deg) const
        // which can easily be solved given the starting value c_0 = (a_0)^p.
        // For the more general case where the leading coefficient of A(x) is not
        // a constant, just consider A2(x) = A(x)*x^m, with some integer m and
-       // repeat the above derivation.  The leading power of C2(x) = A2(x)^2 is
-       // then of course x^(p*m) but the recurrence formula still holds.
+       // repeat the above derivation.  The leading power of C2(x) = A2(x)^p is
+       // then of course a_0^p*x^(p*m) but the recurrence formula still holds.
        
        if (seq.empty()) {
                // as a special case, handle the empty (zero) series honoring the
@@ -1006,16 +1005,27 @@ ex pseries::power_const(const numeric &p, int deg) const
                else
                        return *this;
        }
-       
-       const int ldeg = ldegree(var);
-       if (!(p*ldeg).is_integer())
+
+       const int base_ldeg = ldegree(var);
+       if (!(p*base_ldeg).is_integer())
                throw std::runtime_error("pseries::power_const(): trying to assemble a Puiseux series");
+       int new_ldeg = (p*base_ldeg).to_int();
+
+       const int base_deg = degree(var);
+       int new_deg = deg;
+       if (p.is_pos_integer()) {
+               // No need to compute beyond p*base_deg.
+               new_deg = std::min((p*base_deg).to_int(), deg);
+       }
 
        // adjust number of coefficients
-       int numcoeff = deg - (p*ldeg).to_int();
+       int numcoeff = new_deg - new_ldeg;
+       if (new_deg < deg)
+               numcoeff += 1;
+
        if (numcoeff <= 0) {
-               epvector epv { expair(Order(_ex1), deg) };
-               return dynallocate<pseries>(relational(var,point), std::move(epv));
+               return dynallocate<pseries>(relational(var, point),
+                                           epvector{{Order(_ex1), deg}});
        }
        
        // O(x^n)^(-m) is undefined
@@ -1025,33 +1035,35 @@ ex pseries::power_const(const numeric &p, int deg) const
        // Compute coefficients of the powered series
        exvector co;
        co.reserve(numcoeff);
-       co.push_back(pow(coeff(var, ldeg), p));
+       co.push_back(pow(coeff(var, base_ldeg), p));
        for (int i=1; i<numcoeff; ++i) {
                ex sum = _ex0;
                for (int j=1; j<=i; ++j) {
-                       ex c = coeff(var, j + ldeg);
+                       ex c = coeff(var, j + base_ldeg);
                        if (is_order_function(c)) {
                                co.push_back(Order(_ex1));
                                break;
                        } else
                                sum += (p * j - (i - j)) * co[i - j] * c;
                }
-               co.push_back(sum / coeff(var, ldeg) / i);
+               co.push_back(sum / coeff(var, base_ldeg) / i);
        }
        
        // Construct new series (of non-zero coefficients)
        epvector new_seq;
        bool higher_order = false;
        for (int i=0; i<numcoeff; ++i) {
-               if (!co[i].is_zero())
-                       new_seq.emplace_back(expair(co[i], p * ldeg + i));
+               if (!co[i].is_zero()) {
+                       new_seq.emplace_back(expair(co[i], new_ldeg + i));
+               }
                if (is_order_function(co[i])) {
                        higher_order = true;
                        break;
                }
        }
-       if (!higher_order)
-               new_seq.emplace_back(expair(Order(_ex1), p * ldeg + numcoeff));
+       if (!higher_order && new_deg == deg) {
+               new_seq.emplace_back(expair{Order(_ex1), new_deg});
+       }
 
        return pseries(relational(var,point), std::move(new_seq));
 }
@@ -1151,7 +1163,8 @@ ex power::series(const relational & r, int order, unsigned options) const
 
        if (!(real_ldegree*numexp).is_integer())
                throw std::runtime_error("pseries::power_const(): trying to assemble a Puiseux series");
-       ex e = basis.series(r, (order + real_ldegree*(1-numexp)).to_int(), options);
+       int extra_terms = (real_ldegree*(1-numexp)).to_int();
+       ex e = basis.series(r, order + std::max(0, extra_terms), options);
        
        ex result;
        try {
index 6413475b70914954c9a05e7b82a2d7a6b0698398..0f60fc669384a032400b4c7348e4248452b6296c 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to class for extended truncated power series. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 852b9593cdad0c12bdf7bdfd88357aa235adb4f1..4bfda5db516fdc43a538391ff848eca914888f8f 100644 (file)
@@ -3,7 +3,7 @@
  *  Reference-counted pointer template. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index cde628d5d953a58b9ab4a26081a1a5a831ae7d59..cd628a94cb61d0231109909460ffde08e64fa202 100644 (file)
@@ -3,7 +3,7 @@
  *  GiNaC's class registrar (for class basic and all classes derived from it). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f427c9b5cc98677b507685f73228055783a69a0a..be1a5c9a0f5ac6420908808a281eca976bad0b9a 100644 (file)
@@ -3,7 +3,7 @@
  *  GiNaC's class registrar (for class basic and all classes derived from it). */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index e1bf60072944f2891186420a2acb0c98ed4258e2..8607dca905884246bd70d2e442cb6e0491f4376a 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of relations between expressions */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f173debbb5ce7106b6024e67cc0dbd5623b706d8..5fd8b27116fde777eea21d042bff15e1869810db 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to relations between expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 2aedd44603563305122de4619fc2d33d2236abb5..3e0db834065a4430effb8841d765d305858e688d 100644 (file)
@@ -4,7 +4,7 @@
  *  in GiNaC functions */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 8c61376b64d2c28d9eda8a3c4c7a035c9a51e650..4fe1736880743d306b0713fbd62152a6e2b62a97 100644 (file)
@@ -4,7 +4,7 @@
  *  in GiNaC functions */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index cfad09517fca34a3c223ba42736bf1984a0bb799..acea1c38169d090f3d0c3305a789da4c67dbc3a9 100644 (file)
@@ -3,7 +3,7 @@
  *  Wrapper template for making GiNaC classes out of C++ structures. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 39d30716c5d6ca525d19fa15003731b15991eaf5..1f25f0d67a8e2120da87ed245651a77901623928 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symbolic objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 61231a0e726f38bd1dbe835d1ed152fd12090340..ea37a5efc1e773d5dbeecd16ae67fbf2aa7aca3d 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symbolic objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index dffcd9d5177a3d0647d0290d4664de1cf23c756b..159d18f3c61f5159051696f8712ce2debdd12da2 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's symmetry definitions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 11b6ff8182884bf281473c09ec0108fb92e88672..f46e66d3970c0ebef9b76933a177b7ee263c613a 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symmetry definitions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d23232044ece07669b8b5c60ffe2cc69b83649ca..4ad07dd30fb8a24cfbc65c2403d34da53d1e5a75 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's special tensors. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index d21fbc6353d201370129733af9f2177e77e61f6e..b0c86308521cf5b5e9f68e33b956068513855ea6 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's special tensors. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 033b93d6e01a713932958ed94d64c023b4a6d885..4750a029090be8a87244a8af8a3115feaf8b94f0 100644 (file)
@@ -4,7 +4,7 @@
  *  but not of any interest to the user of the library. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index a7029af04c78282088607cd7e99ef02da93557a1..e8ac1bd1a3c6585a838b965dfb7810b00ddc3927 100644 (file)
@@ -4,7 +4,7 @@
  *  of any interest to the user of the library. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index fb7560576575e2cc8ccff025c02f655b1c5baac6..443b12c1771320e81545f32c5fbb90455247665f 100644 (file)
@@ -3,7 +3,7 @@
  *  Utilities for summing over multiple indices */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 91d9c65039c8197116e0e271cc6f1eee933a348c..d6c1381bbf2040de7b67e031ea99d9bea77730de 100644 (file)
@@ -3,7 +3,7 @@
  *  GiNaC library version information. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
 #define GINACLIB_MINOR_VERSION 8
 
 /* Micro version of GiNaC */
-#define GINACLIB_MICRO_VERSION 4
+#define GINACLIB_MICRO_VERSION 7
 
 // GiNaC library version information. It has very little to do with GiNaC
 // version number. In particular, library version is OS dependent. 
@@ -56,7 +56,7 @@
 //  * change matrix inverse to use default argument (twice)
 //  * check for interfaces marked as deprecated
 #define GINAC_LT_CURRENT  12
-#define GINAC_LT_REVISION 3
+#define GINAC_LT_REVISION 6
 #define GINAC_LT_AGE      1
 
 /*
index 0acb3852a272d9244c99f843c0e0542726b5be3a..4512c87e1a9cdf3c059bb0c5ccd8faba77af41ea 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's wildcard objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 3ac347fcc42e6a6104c0791910f584b4c22183d0..34d0c5e7250f46ae92cbec576e0b7f9f0b239224 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's wildcard objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 0ce1e1c33d962be77a107f000729d3d163340be6..e9ab0555da22714904a16bbd6db8a5d55e9726e5 100644 (file)
@@ -533,7 +533,7 @@ C++ programming language
 .PP
 CLN \- A Class Library for Numbers, Bruno Haible
 .SH COPYRIGHT
-Copyright \(co 1999-2023 Johannes Gutenberg Universit\(:at Mainz, Germany
+Copyright \(co 1999-2024 Johannes Gutenberg Universit\(:at Mainz, Germany
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index 5b42a641b5945165b6f1edda566efe2a7e4d6ece..0decd3cd89bc117065254b2a3a3ace59604ad157 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Global definitions for ginsh.
  *
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index f3fa5100e9b4e97fee9763f54e783082954a211d..6c00a6c9a2f551a02239f538454af2fa2834d8f7 100644 (file)
@@ -5,7 +5,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 8692b1ac4fea6a7e1a80d0445939b5c9c6e6e7b9..449ce6b5c44234dbab7ca977d6142313f9abb36d 100644 (file)
@@ -4,7 +4,7 @@
  *  This file must be processed with flex. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -203,8 +203,16 @@ static int ginsh_input(char *buf, int max_size)
                        YY_FATAL_ERROR("input in flex scanner failed");
                result = n;
 #endif
-       } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && ferror(yyin))
-               YY_FATAL_ERROR("input in flex scanner failed");
+       } else {
+               int c = '*', n;
+               for (n = 0; n < max_size && (c = getc(yyin)) != EOF && c != '\n'; ++n)
+                       buf[n] = (char)c;
+               if (c == '\n')
+                       buf[n++] = (char)c;
+               if (c == EOF && ferror(yyin))
+                       YY_FATAL_ERROR("input in flex scanner failed");
+               result = n;
+       }
 
        return result;
 }
index fb8788f35efb8f0e5401687dcdda5f3521992a73..a142f4bba25109c139b50b33284dac2d8afd9e6d 100644 (file)
@@ -4,7 +4,7 @@
  *  This file must be processed with yacc/bison. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -1013,7 +1013,7 @@ static void ginsh_readline_init(char* name)
 void greeting(void)
 {
     cout << "ginsh - GiNaC Interactive Shell (GiNaC V" << GINACLIB_VERSION << ")" << endl;
-    cout << "  __,  _______  Copyright (C) 1999-2023 Johannes Gutenberg University Mainz,\n"
+    cout << "  __,  _______  Copyright (C) 1999-2024 Johannes Gutenberg University Mainz,\n"
          << " (__) *       | Germany.  This is free software with ABSOLUTELY NO WARRANTY.\n"
          << "  ._) i N a C | You are welcome to redistribute it under certain conditions.\n"
          << "<-------------' For details type `warranty;'.\n" << endl;
index a3d964c699aac74685d2407f3f01ad077d1a15a1..8edf5152ec7a91bea5858436ae70bb6e877689a4 100644 (file)
@@ -43,7 +43,7 @@
 #   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-#serial 15
+#serial 18
 
 dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
 dnl  (serial version number 13).
@@ -104,9 +104,18 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
     dnl HP's aCC needs +std=c++11 according to:
     dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
     dnl Cray's crayCC needs "-h std=c++11"
+    dnl MSVC needs -std:c++NN for C++17 and later (default is C++14)
     for alternative in ${ax_cxx_compile_alternatives}; do
-      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
-        cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+      for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do
+        if test x"$switch" = xMSVC; then
+          dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide
+          dnl with -std=c++17.  We suffix the cache variable name with _MSVC to
+          dnl avoid this.
+          switch=-std:c++${alternative}
+          cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC])
+        else
+          cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+        fi
         AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
                        $cachevar,
           [ac_save_CXX="$CXX"
index b9223241b43670d990e32c5ff212661a3bdec1e8..134f2283414e0928f045c36c783b21aeee9ebb55 100644 (file)
@@ -1,5 +1,5 @@
 # host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 934207a7658781f67c79c02d9facc518759c60c5..6bc1886f5359c0822eadfe614c124732cff2cb08 100644 (file)
@@ -1,5 +1,5 @@
 # lib-ld.m4 serial 10
-dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
index 3b75bcd0de141a4405abc17f1a86df4ae5c34a91..5f8afae61a6a6093547ff10737765aa791fade0e 100644 (file)
@@ -1,5 +1,5 @@
 # lib-link.m4 serial 33
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -224,7 +224,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
     additional_libdir3=
   fi
   dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
+  dnl $LDFLAGS. Use breadth-first search.
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
index 999f712f5acd4102385e4eadedf78913aa773a5f..aefe7f7124df24754adb4bc370b4b7cfa880ebb3 100644 (file)
@@ -1,5 +1,5 @@
 # lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
diff --git a/scripts/fixupind.py b/scripts/fixupind.py
deleted file mode 100644 (file)
index 0e781c0..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# encoding: utf-8
-# TeX Live 2012 seems to dislike files produces by doxygen (1.8.x.y)
-# In particular, makeindex(1) program creates invalid index entries like
-# \hyperpage{NNN_}
-# (note the trailing underscore in the page number). This breaks automatic
-# builds and is very annoying. Hence this script. It replaces (broken)
-# \hyperpage{NNN_} with \hyperpage{NNN}.
-# Note: this is an ugly work around, a proper fix is welcome.
-import sys, os, re
-
-def fixupind(fname):
-       """ Fix \\hyperpage{NNN_} entries in the ind file @var{fname} """
-       tmpout = fname + '.tmp'
-       inp = open(fname)
-       out = open(tmpout, 'wt')
-       rx = re.compile('(hyperpage)[{]([0-9]+)[_][}]')
-       for line in inp:
-               out.write(re.sub(rx, '\\1{\\2}', line))
-       out.flush()
-       out.close()
-       inp.close()
-       os.rename(tmpout, fname)
-
-if __name__ == '__main__':
-       if len(sys.argv) <= 1:
-               sys.exit(1)
-       fixupind(sys.argv[1])
-       sys.exit(0)
-
index bd024ba6b8d9ed91deb49ce0e5b5422dca349b47..38ead99b1f422d022d8263de7b6ad33baeff1026 100644 (file)
@@ -22,7 +22,7 @@ The GiNaC maintainers <https://www.ginac.de/>.
 GiNaC Tutorial \- An open framework for symbolic computation within the
 C++ programming language
 .SH COPYRIGHT
-Copyright \(co 1999-2023 Johannes Gutenberg Universit\(:at Mainz, Germany
+Copyright \(co 1999-2024 Johannes Gutenberg Universit\(:at Mainz, Germany
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
index a8c2eff87db3cf8c8c259993a4c596d741e7f71b..c369591788f92fe368a21284d95fa11524effd91 100644 (file)
@@ -3,7 +3,7 @@
  *  GiNaC archive file viewer. */
 
 /*
- *  GiNaC Copyright (C) 1999-2023 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by