[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-57-ga7693a0
Jens Vollinga
git at ginac.de
Mon Jul 28 21:51:02 CEST 2008
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 a7693a0f710b49494f95ce5a4a0953752e69c7f9 (commit)
via 2d52c00438cde2c47f43620d26d78022f0d60746 (commit)
via a297391b22c1a4ec3464d13191f8cb33332c9863 (commit)
via 5ea14a22768031a1cd4abce2926d5359c5d0c15f (commit)
via 7bc327c75aaa3118de14dfcee59bcf0fd40e3f4a (commit)
via 58aaaf83c55c5784e1d94c2a794af96d7769165b (commit)
via 6335b2cfb6f3f9ec339ff683bed415a5879d7909 (commit)
via 2406529f5ceb193a46b1b5a07a8810880a8ceceb (commit)
from e20fd5e760136cf343f4d2d73d0f3dfc6573ac49 (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 a7693a0f710b49494f95ce5a4a0953752e69c7f9
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:28:34 2008 +0300
define lgamma and tgamma taking cl_N as an argument.
The actual code is the same. These functions are OK since cl_N is not
automatically converted to numeric any more.
commit 2d52c00438cde2c47f43620d26d78022f0d60746
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:28:10 2008 +0300
Implicit conversion from cl_N to numeric considered harmful.
Finally, mark the numeric(const cl_N&) ctor as explicit.
This allows one to mix the code using GiNaC and CLN, i.e.
cl_N x, y;
// initialize them
cl_N z = sin(x) + y*exp(y);
symbol a("a");
ex e = exp(a);
commit a297391b22c1a4ec3464d13191f8cb33332c9863
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:27:27 2008 +0300
bernoulli, fibonacci, iquo: explicitly convert return values to numeric.
Implicit conversion from cl_N to numeric considered harmful, part 6.
commit 5ea14a22768031a1cd4abce2926d5359c5d0c15f
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:27:07 2008 +0300
tgamma, lgamma: convert to take cl_N as an argument; provide wrappers for GiNaC::numeric
Implicit conversion from cl_N to numeric considered harmful, part 5.
commit 7bc327c75aaa3118de14dfcee59bcf0fd40e3f4a
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:26:52 2008 +0300
Li2, zeta, sqrt, abs, gcd, etc.: explicitly convert return value to numeric.
Implicit conversion from cl_N to numeric considered harmful, part 4.
commit 58aaaf83c55c5784e1d94c2a794af96d7769165b
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:26:23 2008 +0300
elementary functions: explicitly convert return values from cl_N to numeric.
Implicit conversion from cl_N to numeric considered harmful, part 3.
commit 6335b2cfb6f3f9ec339ff683bed415a5879d7909
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:25:55 2008 +0300
inifcns_nstdsums.cpp: Lin_numeric takes cl_N as an argument instead of numeric.
Implicit conversion from cl_N to numeric considered harmful, part 2.
commit 2406529f5ceb193a46b1b5a07a8810880a8ceceb
Author: Alexei Sheplyakov <varg at theor.jinr.ru>
Date: Wed Mar 19 12:24:36 2008 +0300
inifcns_nstdsums.cpp: S_num takes cl_N as an argument instead of numeric.
Implicit conversion from cl_N to numeric considered harmful.
Using GiNaC::numeric for numerical computations incurs significant
overhead, so one might want to do these computations using proper CLN
types. Unfortunately, it's not easy due to automatic conversion from
cln::cl_N to GiNaC::numeric. Here is a simple example:
cl_N x, y;
// initialize them
return sin(x) + y*exp(y);
The compiler complains about ambigously overloaded of functions, i.e.
cl_N cln::sin(const cl_N&) versus numeric GiNaC::sin(const numeric&).
Hence, I propose to disable *implicit* conversion from cl_N to numeric
(this can be done by marking the numeric ctor as `explicit').
However, this change happens to be a bit nontrivial, because that evil
conversion is used in GiNaC itself. So, I decided to rewrite those fragments
of code.
-----------------------------------------------------------------------
Summary of changes:
ginac/inifcns_nstdsums.cpp | 87 ++++++++++++++----------
ginac/numeric.cpp | 163 ++++++++++++++++++++++++++-----------------
ginac/numeric.h | 2 +-
3 files changed, 151 insertions(+), 101 deletions(-)
hooks/post-receive
--
GiNaC -- a C++ library for symbolic computations
More information about the GiNaC-devel
mailing list