From V.Kisil at leeds.ac.uk Mon Aug 2 09:47:40 2021 From: V.Kisil at leeds.ac.uk (Vladimir V. Kisil) Date: Mon, 2 Aug 2021 07:47:40 +0000 Subject: [GiNaC-devel] BugFix: functions confused with exponent Message-ID: <1129976.1627890459@zbook-hp.Home> Dear All, Currently the following code in GiNaC realsymbol x("x"); cout << (cos(x)/exp(x)).normal() << endl; prints value 1 with probability 50% (and the unmodified expression otherwise). I am attaching a one-line patch to fix this silly bug. Also I am attaching a previous patch which was not commented so far. The new method may be helpful from time to time but its equivalent in a user code would be much more involved due to the private nature of the relation class members. Best wishes, Vladimir -- Vladimir V. Kisil http://www.maths.leeds.ac.uk/~kisilv/ Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil/MoebInv-notebooks -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Fix-a-bug-in-normal-method.patch Type: text/x-diff Size: 1232 bytes Desc: BugFix patch.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-Add-method-relational-canonical.patch Type: text/x-diff Size: 3000 bytes Desc: Add memeber patch.patch URL: From kreckel at in.terlu.de Sun Aug 8 16:43:47 2021 From: kreckel at in.terlu.de (Richard B. Kreckel) Date: Sun, 8 Aug 2021 16:43:47 +0200 Subject: [GiNaC-devel] BugFix: functions confused with exponent In-Reply-To: <1129976.1627890459@zbook-hp.Home> References: <1129976.1627890459@zbook-hp.Home> Message-ID: <19566949-2152-06ba-3f12-03acf42d0c34@in.terlu.de> Dear Vladimir, Thanks for spotting this bug and for fixing it! I'm applying your patch. Also applying the second one about relational::canonical() function. (Sorry for the delay.) -richy. -- Richard B. Kreckel On 02.08.21 09:47, Vladimir V. Kisil wrote: > Dear All, > > Currently the following code in GiNaC > > realsymbol x("x"); > cout << (cos(x)/exp(x)).normal() << endl; > > prints value 1 with probability 50% (and the unmodified expression > otherwise). I am attaching a one-line patch to fix this silly bug. > > Also I am attaching a previous patch which was not commented so > far. The new method may be helpful from time to time but its > equivalent in a user code would be much more involved due to the > private nature of the relation class members. > > Best wishes, > Vladimir > > > _______________________________________________ > GiNaC-devel mailing list > GiNaC-devel at ginac.de > https://www.ginac.de/mailman/listinfo/ginac-devel From git at ginac.de Mon Aug 9 16:50:54 2021 From: git at ginac.de (Richard B. Kreckel) Date: Mon, 9 Aug 2021 16:50:54 +0200 (CEST) Subject: [GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-721-g9197695f Message-ID: <20210809145054.10CB4D81543@cebix.net> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GiNaC -- a C++ library for symbolic computations". The branch, master has been updated via 9197695fc88502b6a56c7270e824f73faa7749f9 (commit) via cb1ab077ba8ef330a75f40cf78b21fabbb35fb62 (commit) via 11b9b59551913fc7cce475482548874504d9bf42 (commit) from d5a419b8517e3103087cceb3f6a9585b60e46543 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9197695fc88502b6a56c7270e824f73faa7749f9 Author: Richard Kreckel Date: Mon Aug 9 11:39:31 2021 +0200 Finalize 1.8.1 release. commit cb1ab077ba8ef330a75f40cf78b21fabbb35fb62 Author: Vladimir V. Kisil Date: Sun Aug 8 16:18:31 2021 +0200 Add method relational::canonical(). It returns an equivalent relation with the zero right-hand side. commit 11b9b59551913fc7cce475482548874504d9bf42 Author: Vladimir V. Kisil Date: Sun Aug 8 16:01:46 2021 +0200 [BUGFIX] Fix a bug in normal() method. Any function was confused with an exponent of the same argument during a normalisation of an expression. Example: normal(cos(x)/exp(x)) often returned 1 for realsymbol x. ----------------------------------------------------------------------- Summary of changes: NEWS | 9 +++++++++ doc/tutorial/ginac.texi | 20 +++++++++++++++++++- ginac/normal.cpp | 2 +- ginac/relational.cpp | 9 ++++++++- ginac/relational.h | 2 ++ ginac/version.h | 13 ++++++++----- m4/ax_cxx_compile_stdcxx.m4 | 15 +++++++++++++-- m4/host-cpu-c-abi.m4 | 21 ++++++++++++++++----- 8 files changed, 76 insertions(+), 15 deletions(-) hooks/post-receive -- GiNaC -- a C++ library for symbolic computations From git at ginac.de Mon Aug 9 17:07:25 2021 From: git at ginac.de (Richard B. Kreckel) Date: Mon, 9 Aug 2021 17:07:25 +0200 (CEST) Subject: [GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations tag, release_1-8-1, created. release_1-4-0-721-g9197695f Message-ID: <20210809150725.82BAED815C0@cebix.net> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GiNaC -- a C++ library for symbolic computations". The tag, release_1-8-1 has been created at 9197695fc88502b6a56c7270e824f73faa7749f9 (commit) - Log ----------------------------------------------------------------- commit 9197695fc88502b6a56c7270e824f73faa7749f9 Author: Richard Kreckel Date: Mon Aug 9 11:39:31 2021 +0200 Finalize 1.8.1 release. ----------------------------------------------------------------------- hooks/post-receive -- GiNaC -- a C++ library for symbolic computations From kreckel at in.terlu.de Mon Aug 9 17:21:52 2021 From: kreckel at in.terlu.de (Richard B. Kreckel) Date: Mon, 9 Aug 2021 17:21:52 +0200 Subject: [GiNaC-devel] GiNaC 1.8.1 released Message-ID: <8c2a6567-442d-df98-b48d-ef8d6bed5f26@in.terlu.de> Hi, GiNaC 1.8.1 has just been tagged. Here's what's new: * Add method relational::canonical() and improve conversion of relational to Boolean (it now works on many simple symbolic cases). * Improve normalization of negative exponents. * Fix indexing multiply referenced objects with ex::operator[]. * Make functions evalf() their arguments before doing own evalf(). * Fix bugs in H_evalf() and in evaluation of iterated integrals. * Several portability improvements and compiler warning fixes. If you aren't vaccinated, consider getting, and keep hacking! -richy. -- Richard B. Kreckel