[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-226-gbeeb081

Jens Vollinga git at ginac.de
Sat Aug 21 20:29:35 CEST 2010


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  beeb0818e9cdb1b5de0ba2754286ad7bb2a9d032 (commit)
       via  515171f0bcd42099c266713c3d605cd92cedd2e2 (commit)
       via  9993a7aac97abf383624fc5dae4beecb29531fbd (commit)
      from  dbde7117e88ba61597d6fee18615fe396c291a87 (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 beeb0818e9cdb1b5de0ba2754286ad7bb2a9d032
Author: Alexei Sheplyakov <alexei.sheplyakov at gmail.com>
Date:   Sat Aug 21 19:13:29 2010 +0300

    fsolve: avoid useless numerical evaluation of the function
    
    Don't compute f(x) if new x is outside of the interval. We don't need that
    value anyway, and the function might be difficult to compute numerically or
    even ill defined outside the interval.
    
    As a result fsolve is able to find root(s) of some weird functions.
    For example
    
    fsolve((1/(sqrt(2*Pi)))*integral(t, 0, x, exp(-1/2*t^2)) == 0.5, x, 0, 100)
    
    actually works now.

commit 515171f0bcd42099c266713c3d605cd92cedd2e2
Author: Alexei Sheplyakov <alexei.sheplyakov at gmail.com>
Date:   Thu Aug 19 11:10:25 2010 +0300

    integral::evalf(): don't attempt to ignore problems.
    
    Don't ignore exceptions thrown by numerical integration routine.
    In general, the code like this
    
    try {
    	// blah-blah
    } catch (std::exception& err) { }
    
    is just plain evil. Case in the point:
    
    fsolve((1/(sqrt(2*Pi)))*integral(t,0,x,exp(-1/2*t^2))==0.5,x,0,100)

commit 9993a7aac97abf383624fc5dae4beecb29531fbd
Author: Alexei Sheplyakov <alexei.sheplyakov at gmail.com>
Date:   Thu Aug 19 00:07:13 2010 +0300

    fsolve: check if evalf() return value is actually a number.
    
    Fixes the segfault triggered by
    
    fsolve((1/(sqrt(2*Pi)))*integral(t,0,x,exp(-1/2*t^2))==0.5,x,0,100)
    
    In general, ex_to is unsafe, and should be used only after proper checks.
    evalf() may return non-numeric expression for various reasons (bad
    convergence, floating point over- or underflow, out of memory, etc).
    So let's add missing checks.
    
    Thanks to Ernst Moritz Hahn for a bug report.

-----------------------------------------------------------------------

Summary of changes:
 ginac/inifcns.cpp  |   38 ++++++++++++++++++++++++++++++++------
 ginac/integral.cpp |    2 --
 2 files changed, 32 insertions(+), 8 deletions(-)


hooks/post-receive
--
GiNaC -- a C++ library for symbolic computations


More information about the GiNaC-devel mailing list