]> www.ginac.de Git - ginac.git/log
ginac.git
3 years agoMinor bug fix for the class modular_form_kernel: Ensure that the series-method includ...
Stefan Weinzierl [Thu, 9 Sep 2021 14:21:45 +0000 (16:21 +0200)]
Minor bug fix for the class modular_form_kernel: Ensure that the series-method includes an order term.

3 years agoFinalize 1.8.1 release. release_1-8-1
Richard Kreckel [Mon, 9 Aug 2021 09:39:31 +0000 (11:39 +0200)]
Finalize 1.8.1 release.

3 years agoAdd method relational::canonical().
Vladimir V. Kisil [Sun, 8 Aug 2021 14:18:31 +0000 (16:18 +0200)]
Add method relational::canonical().

It returns an equivalent relation with the zero right-hand side.

3 years ago[BUGFIX] Fix a bug in normal() method.
Vladimir V. Kisil [Sun, 8 Aug 2021 14:01:46 +0000 (16:01 +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.

3 years agoBug fix in modular_form_kernel::is_numeric and modular_form_kernel::Laurent_series...
Stefan Weinzierl [Tue, 27 Jul 2021 18:55:54 +0000 (20:55 +0200)]
Bug fix in modular_form_kernel::is_numeric and modular_form_kernel::Laurent_series: Call the correct method to compute the series expansion.

This bug has been reported by Christoph Dlapa.

3 years agoBug fix in the routine H_evalf (a minus sign should not be forgotten).
Stefan Weinzierl [Wed, 9 Jun 2021 12:10:23 +0000 (14:10 +0200)]
Bug fix in the routine H_evalf (a minus sign should not be forgotten).

This bug was reported by Bin Zhou.

3 years agoAdd simple exam test for releational objects.
Richard Kreckel [Sun, 6 Jun 2021 12:48:00 +0000 (14:48 +0200)]
Add simple exam test for releational objects.

3 years agoSmarter relational to Boolean conversion.
Vladimir V. Kisil [Sun, 6 Jun 2021 12:00:50 +0000 (14:00 +0200)]
Smarter relational to Boolean conversion.

If a relational contains symbolic entries we look to ex::info
to decide whether it can be converted to true value.

3 years ago[PATCH] Improve normalisation of negative exponents.
Vladimir V. Kisil [Mon, 5 Apr 2021 19:01:30 +0000 (21:01 +0200)]
[PATCH] Improve normalisation of negative exponents.

If an expression contains exponents with opposite signs,
then the respective symbolic substitutions need to be properly
attributed to numerator/denominator slots.

3 years agoAdd exam for ex::collect().
Richard Kreckel [Mon, 5 Apr 2021 18:57:34 +0000 (20:57 +0200)]
Add exam for ex::collect().

3 years ago[PATCH] Make ex::operator[] const dispatch to basic::operator[] const.
Richard Kreckel [Mon, 5 Apr 2021 18:46:55 +0000 (20:46 +0200)]
[PATCH] Make ex::operator[] const dispatch to basic::operator[] const.

It turned out that ex::operator[] const dispatched to non-const
basic::operator[] because
* member variable ex::bp is non-const and
* ptr<T>::operator*() returns a non-const T &.

As a result, indexing failed for multiply referenced objects.

Thanks to Vitaly Magerya <vmagerya@gmail.com> for reporting this.

3 years agoG_do_hoelder: fix bug related to comparing a float with a rational number in CLN.
Stefan Weinzierl [Wed, 24 Mar 2021 08:43:26 +0000 (09:43 +0100)]
G_do_hoelder: fix bug related to comparing a float with a rational number in CLN.

This bug has been reported by Simone Zoia.

3 years agoFix misleading comment in last commit.
Richard Kreckel [Fri, 26 Feb 2021 22:15:12 +0000 (23:15 +0100)]
Fix misleading comment in last commit.

3 years agoAvoid "instantiation of variable 'reg_info' required..." warning.
Richard Kreckel [Wed, 3 Feb 2021 13:40:49 +0000 (14:40 +0100)]
Avoid "instantiation of variable 'reg_info' required..." warning.

With -Wundefined-var-template (on by default), CLang++ warns that
no definition for the static 'reg_info' member variable is available.

3 years agobugfix: function: always pass evalf'ed arguments to evalf_funcp
Alexey Sheplyakov [Fri, 1 Jan 2021 16:09:47 +0000 (20:09 +0400)]
bugfix: function: always pass evalf'ed arguments to evalf_funcp

GiNaC passes unevaluted arguments to a function with evalf_funcp
taking an exvector. Fixed that, and added a test case

3 years agoAvoid multiple definitions of `lst::info` (MinGW compile fix)
Alexey Sheplyakov [Wed, 6 Jan 2021 07:20:46 +0000 (11:20 +0400)]
Avoid multiple definitions of `lst::info` (MinGW compile fix)

[55/59] Linking CXX shared library bin/libginac.dll
FAILED: bin/libginac.dll ginac/libginac.dll.a
[skipped long list of object files]
/usr/bin/x86_64-w64-mingw32-ld: ginac/CMakeFiles/ginac.dir/lst.cpp.obj: in function `GiNaC::ptr<GiNaC::basic>::~ptr()':
/home/asheplyakov/work/sw/ginac/_build_w64/../ginac/container.h:150: multiple definition of `GiNaC::container<std::__cxx11::list>::info(unsigned int) const'; ginac/CMakeFiles/ginac.dir/integration_kernel.cpp.obj:/home/asheplyakov/work/sw/ginac/_build_w64/../ginac/container.h:116: first defined here

integration_kernel.cpp makes use of GiNaC::lst without including the `lst.h`
header. That's possible since there's a typedef in `registrar.h` (included
by virtually all GiNaC sources) and a defintion in `container.h` (included
via `add.h` -> `expairseq.h` -> `indexed.h` -> `exprseq.h`), so the compiler
can instantiate container<std::list>. However the explicit specialization
of `lst::info` is not available (in integration_kernel.cpp). This violates
17.8.3.6 [templ.expl.spec] which demands

If a template, a member template or a member of a class template is
explicitly specialized then that specialization shall be declared before
the first use of that specialization that would cause an implicit
instantiation to take place, in every translation unit in which such
a use occurs; no diagnostic is required. If the program does not provide
a definition for an explicit specialization and either the specialization
is used ina way that would cause an implicit instantiation to take place
or the member is a virtual member function, the program is ill-formed,
no diagnostic required.

On ELF platforms libginac appears to link just fine despite having two
instantiations of `lst::info` since the of them (in `integration_kernel.o`)
is a weak symbol:

$ find ginac -type f -name '*.o' | xargs -n 1 nm --print-file-name --defined | c++filt | grep -e 'list>::info('
ginac/CMakeFiles/ginac.dir/integration_kernel.cpp.o:0000000000000000 W GiNaC::container<std::__cxx11::list>::info(unsigned int) const
ginac/CMakeFiles/ginac.dir/lst.cpp.o:0000000000000000 T GiNaC::container<std::__cxx11::list>::info(unsigned int) const

so the linker discards the wrong instantiation of `lst::info` method.
However on MinGW there are no weak symbols (in ELF sense):

$ find ginac -type f -name '*.obj' | xargs -n 1 x86_64-w64-mingw32-nm --print-file-name --defined | c++filt | grep -e 'list>::info('
ginac/CMakeFiles/ginac.dir/lst.cpp.obj:0000000000000010 T GiNaC::container<std::__cxx11::list>::info(unsigned int) const
ginac/CMakeFiles/ginac.dir/integration_kernel.cpp.obj:0000000000000000 T GiNaC::container<std::__cxx11::list>::info(unsigned int) const

Hence the above multiple definition error.

To avoid the problem #include "lst.h" (so explicit specialization is available).
While at it explicitly instantiate lst::info method in lst.cpp

A better solution would be to remove declaration of lst from registrar.h,
but that's too disruptive since GiNaC uses lst a lot: subs, unarchive, etc.

3 years agoFix minimum CLN version for pkg-config.
Richard Kreckel [Fri, 1 Jan 2021 19:33:09 +0000 (20:33 +0100)]
Fix minimum CLN version for pkg-config.

3 years agoHappy New Year!
Richard Kreckel [Fri, 1 Jan 2021 18:14:38 +0000 (19:14 +0100)]
Happy New Year!

3 years agoUpdate some references.
Richard Kreckel [Sun, 22 Nov 2020 22:05:36 +0000 (23:05 +0100)]
Update some references.

3 years agoAvoid 'variable uninitialized when used within its own initialization' warning.
Richard Kreckel [Sun, 22 Nov 2020 20:40:58 +0000 (21:40 +0100)]
Avoid 'variable uninitialized when used within its own initialization' warning.

Initialize the static flyweight ex objects with the pointeed numeric
objects instead of using self-assignment. This is 100% equivalent to
before: The objects have already been initialized by the library_init
ctor so all the static object's ctor does is increment the pointeed
object's refcount.

According to the resolution of C++ core language defect 363 the warning is
incorrect because it is allowed to pass a reference to the object, see
<https://wg21.link/cwg363>. Incrementing the bp's refcount is okay too,
because the pointee numeric object has been fully initialized by the
library_init ctor. However, the compiler can hardly know this, so CLang++
issues a warning.

4 years agobuild: Fix CMake install for info file. release_1-8-0
Richard Kreckel [Wed, 14 Oct 2020 21:16:08 +0000 (23:16 +0200)]
build: Fix CMake install for info file.

It seams like CMake does not know any variable named ${SHARE_INSTALL_PREFIX}.

4 years agoFinalize 1.8.0 release.
Richard Kreckel [Wed, 14 Oct 2020 21:15:05 +0000 (23:15 +0200)]
Finalize 1.8.0 release.

4 years agoClarify types of test suite files.
Richard Kreckel [Wed, 14 Oct 2020 18:12:37 +0000 (20:12 +0200)]
Clarify types of test suite files.

4 years agoReplaced dummy reference by correct reference.
Stefan Weinzierl [Tue, 13 Oct 2020 12:51:24 +0000 (14:51 +0200)]
Replaced dummy reference by correct reference.

4 years agoRename test suite files...
Richard Kreckel [Mon, 12 Oct 2020 18:42:49 +0000 (20:42 +0200)]
Rename test suite files...

...to match any of the three types:
exam*   test result for specific input (like a pupil's exam)
check*  test coherence of results among each other, for random input
time*   measure run-time

All tests are still there, but maybe elsewhere:
* rename match_bug.cpp => exam_match.cpp
* rename heur_gcd_bug.cpp => exam_heur_gcd.cpp
* rename bugme_chinrem_gcd.cpp => exam_chinrem_gcd.cpp
* rename parser_bugs.cpp => exam_parser.cpp
* rename exam_cra.cpp => check_cra.cpp
* include numeric_archive.cpp => exam_archive.cpp
* include pgcd_infinite_loop.cpp => exam_pgcd.cpp
* include pgcd_relatively_prime_bug.cpp => exam_pgcd.cpp

These two have been deleted, since memory leaks are best looked for
using tools on real programs on a regular basis (they were also not
automatically executed):
* delete parser_memleak.cpp
* delete mul_eval_memleak.cpp

4 years agoReset GINAC_LT_AGE to bump SONAME.
Richard Kreckel [Sun, 11 Oct 2020 17:08:19 +0000 (19:08 +0200)]
Reset GINAC_LT_AGE to bump SONAME.

Vladimir's last changes affected virtual functions and vtbl changes usually
require a new library version.

4 years ago[PATCH 3/3] Stronger normalisation method for powers.
Vladimir V. Kisil [Sun, 11 Oct 2020 17:03:30 +0000 (19:03 +0200)]
[PATCH 3/3] Stronger normalisation method for powers.

Now normalisation method try to express powers with the same base
as monomials of some dummy variables. This allows to make cancellations
of the sort:
(x-1)/(sqrt(x)-1)  ->  sqrt(x)+1

Signed-off-by: Vladimir V. Kisil <V.Kisilv@leeds.ac.uk>
4 years ago[PATCH 2/3] Make a stronger normalisation for expressions with exponents.
Vladimir V. Kisil [Sun, 11 Oct 2020 16:44:48 +0000 (18:44 +0200)]
[PATCH 2/3] Make a stronger normalisation for expressions with exponents.

If several exponents have arguments different by a rational number
factors they are replaced by monomials of the same variable.

Signed-off-by: Vladimir V. Kisil <V.Kisilv@leeds.ac.uk>
4 years ago[PATCH 1/3] Automatic evaluation of (e^t)^s = e^(ts).
Vladimir V. Kisil [Sun, 11 Oct 2020 16:33:32 +0000 (18:33 +0200)]
[PATCH 1/3] Automatic evaluation of (e^t)^s = e^(ts).

If it safe to evaluate (e^t)^s = e^(ts) at least in two cases:

a) t and s are reals, the respective formula can be found in
any analysis textbook.

b) if s is an integer, then the ambiguity of t up to the term 2*Pi*k
does not cause a different value.

Signed-off-by: Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>
4 years agoUpdate AUTHORS file more.
Richard Kreckel [Sat, 10 Oct 2020 19:37:35 +0000 (21:37 +0200)]
Update AUTHORS file more.

4 years agoSet version, soname ahead of release.
Richard Kreckel [Sat, 10 Oct 2020 19:35:05 +0000 (21:35 +0200)]
Set version, soname ahead of release.

4 years agoUpdate AUTHORS file...
Richard Kreckel [Sat, 10 Oct 2020 19:01:44 +0000 (21:01 +0200)]
Update AUTHORS file...

...to be more complete and remove authors' names from manpages in favor
of a reference to the web site.

4 years agoRemove deprecated initialization via overloaded comma operator.
Richard Kreckel [Sat, 10 Oct 2020 18:20:59 +0000 (20:20 +0200)]
Remove deprecated initialization via overloaded comma operator.

This feature has been marked as deprecated since 1.7.0. There's been more
than four years to switch to initializer lists. Let's hope people have
modified their code since.

4 years agoAdded new routines for the numerical evaluation of iterated integrals like
Stefan Weinzierl [Sat, 10 Oct 2020 15:11:09 +0000 (17:11 +0200)]
Added new routines for the numerical evaluation of iterated integrals like
elliptic multiple polylogarithms or iterated integrals of modular forms.

Changes to be committed:
modified:   check/CMakeLists.txt
modified:   check/Makefile.am
new file:   check/exam_inifcns_elliptic.cpp
modified:   doc/tutorial/ginac.texi
modified:   ginac/CMakeLists.txt
modified:   ginac/Makefile.am
modified:   ginac/ginac.h
modified:   ginac/inifcns.h
new file:   ginac/inifcns_elliptic.cpp
new file:   ginac/integration_kernel.cpp
new file:   ginac/integration_kernel.h
new file:   ginac/utils_multi_iterator.h
modified:   ginsh/ginsh_parser.ypp

4 years agoRemove executable file attribute from last Python script.
Richard Kreckel [Sat, 29 Aug 2020 18:22:49 +0000 (20:22 +0200)]
Remove executable file attribute from last Python script.

They are all invoked by ${PYTHON} and lack a shebang line since 8a4e28dc81.

4 years agobuild: use bundled CLN if available
Alexey Sheplyakov [Thu, 19 Dec 2019 14:17:41 +0000 (18:17 +0400)]
build: use bundled CLN if available

So one can unpack CLN tarball (or clone CLN git repository) and compile
both CLN and GiNaC in one pass:

git clone git://ginac.de/ginac.git
cd ginac
git clone git://www.ginac.de/cln.git
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. && make

4 years agoUse "modern" CMake facilities to manage includes and libs
Alexey Sheplyakov [Wed, 18 Dec 2019 10:52:17 +0000 (14:52 +0400)]
Use "modern" CMake facilities to manage includes and libs

* Use target_link_libraries to specify dependencies (include paths,
  compiler options, etc)

* Export targets and provide `ginac-config.cmake` so the following
  `CMakeLists.txt` is enough to build a program using GiNaC:

    cmake_minimum_required(VERSION 3.1)
    project(foo)
    find_package(ginac REQUIRED)
    add_executable(foo foo.cpp)
    target_link_libraries(foo PRIVATE ginac::ginac)

* GiNaC can be included as a (CMake) subproject. One can put GiNaC
  sources (either from git or a tarball) into a subdirectory (say,
  `ginac`) and use the following CMakeLists.txt to build everything:

    cmake_minimum_required(VERSION 3.1)
    project(foo)
    add_subdirectory(ginac)
    add_executable(foo foo.cpp)
    target_link_libraries(foo PRIVATE ginac::ginac)

4 years agobuild: windows: enable automatic imports by default
Alexey Sheplyakov [Thu, 26 Dec 2019 17:45:11 +0000 (21:45 +0400)]
build: windows: enable automatic imports by default

For now there are no dllexport/dllimport markings in GiNaC and CLN, so
export all symbols when building GiNaC DLL, and enable automatic imports
when linking with it. Note: this works with GNU linker only.

4 years agobuild: CMake: made it easier to run tests in parallel
Alexey Sheplyakov [Fri, 27 Dec 2019 13:34:05 +0000 (17:34 +0400)]
build: CMake: made it easier to run tests in parallel

As of now `make -jN check` executes test suite sequentially
(although it builds test executables in parallel). This takes
a bit too long, so it would be nice to run tests in parallel.
`ctest -jN` or `make test ARGS=-jN` runs tests concurrently,
however it does not build test executables, instead it fails
if any test binary is missing.

Also `test` target is a bit special and it's impossible to add
dependencies to it, see
https://gitlab.kitware.com/cmake/cmake/issues/8438

To work around the problem define `test_suite` target which
builds the tests suite without running it, so one can both
compile and run tests in parallel

make -j8 test_suite
make test ARGS=-j8

4 years agoMade it easier to run tests on windows
Alexey Sheplyakov [Wed, 25 Dec 2019 16:41:17 +0000 (20:41 +0400)]
Made it easier to run tests on windows

Put executables and DLLs into the `bin` subdirectory so the system
can locate GiNaC (and CLN) DLLs without extra configuration.

4 years agonumeric.cpp, archive.cpp: don't include config.h
Alexey Sheplyakov [Wed, 18 Dec 2019 12:39:12 +0000 (16:39 +0400)]
numeric.cpp, archive.cpp: don't include config.h

config.h is necessary for excompiler only, the rest of the library
is pretty portable. Not including dynamically generated headers
saves compilation time due to more (c)cache hits.

4 years agoBuild example programs to avoid breaking them on API changes
Alexey Sheplyakov [Mon, 6 Jan 2020 18:34:09 +0000 (22:34 +0400)]
Build example programs to avoid breaking them on API changes

4 years agobuild: fixed `ginac-excompiler` installation with CMake
Alexey Sheplyakov [Thu, 19 Dec 2019 14:16:53 +0000 (18:16 +0400)]
build: fixed `ginac-excompiler` installation with CMake

4 years agobuild: accept both python 3 and python 2
Alexey Sheplyakov [Sun, 23 Aug 2020 07:28:07 +0000 (11:28 +0400)]
build: accept both python 3 and python 2

This makes building GiNaC a bit easier for users of "old" distributions
where python 3 is not installed by default (Ubuntu 16.04), or even not
available (CentOS 7).

Scripts themselves work just fine with python 2.7 and python 3.x, so
only minor changes to CMakeLists.txt are required (autotools scripts
already handle python2/3)

4 years ago[build] Fix Python detection in Autotools build.
Richard Kreckel [Sun, 23 Aug 2020 14:09:34 +0000 (16:09 +0200)]
[build] Fix Python detection in Autotools build.

This was a latent bug: the PYTHON variable was not set in Makefiles,
only PYTHON3 was, but scripts were still invoked with $(PYTHON).

While at it, let's also accept python2 >= 2.7.

4 years agoAvoid "catching polymorphic type by value" warnings.
Richard Kreckel [Fri, 21 Aug 2020 17:10:12 +0000 (19:10 +0200)]
Avoid "catching polymorphic type by value" warnings.

4 years agoAvoid unnecessary expansion in sqrfree_yun().
Richard Kreckel [Fri, 21 Aug 2020 15:47:19 +0000 (17:47 +0200)]
Avoid unnecessary expansion in sqrfree_yun().

Don't make the polynomial primitive inside Yun's algorithm. Computing the
primitive part will incur an extra expansion of the polynomial and this
may distroy a pre-factored structure in the other variables. In the multi-
variate case, working with primitive polynomials isn't sufficient anyways
to avoid a final division to discover lost factors.

4 years agoSegregate sqfree() tests into file of its own.
Richard Kreckel [Fri, 21 Aug 2020 15:45:08 +0000 (17:45 +0200)]
Segregate sqfree() tests into file of its own.

4 years ago[build] Use python3 command in CMake build, not python.
Richard Kreckel [Fri, 21 Aug 2020 15:09:36 +0000 (17:09 +0200)]
[build] Use python3 command in CMake build, not python.

4 years agoFinalize 1.7.11 release. release_1-7-11
Richard Kreckel [Mon, 3 Aug 2020 18:45:53 +0000 (20:45 +0200)]
Finalize 1.7.11 release.

4 years agoAdd m4/host-cpu-c-abi.m4.
Richard Kreckel [Mon, 3 Aug 2020 18:44:09 +0000 (20:44 +0200)]
Add m4/host-cpu-c-abi.m4.

This avoids warnings about gl_HOST_CPU_C_ABI_32BIT being m4_require'd
but not m4_defun'd.

4 years agoClean up check suite a little bit.
Richard Kreckel [Mon, 3 Aug 2020 18:01:13 +0000 (20:01 +0200)]
Clean up check suite a little bit.

Some tests in tiny test files are better moved elsewhere to reduce compile
and link time.

4 years agoRemove obsolete debug #include file from factor.cpp.
Richard Kreckel [Mon, 3 Aug 2020 17:20:56 +0000 (19:20 +0200)]
Remove obsolete debug #include file from factor.cpp.

4 years agoMake workarounds for sqrfree_yun() obsolete.
Richard Kreckel [Mon, 3 Aug 2020 16:20:27 +0000 (18:20 +0200)]
Make workarounds for sqrfree_yun() obsolete.

Since Yun's algorithm is based on polynomial GCD, it only finds factors
up to a unit. Callers shouldn't have to work around this, so sqrfree_yun()
now does a final polynomial long division to compute the lost factor and
fixes the result before returning.

4 years ago[BUGFIX] Fix factor_univariate(poly, x) for constant poly.
Richard Kreckel [Mon, 3 Aug 2020 16:09:30 +0000 (18:09 +0200)]
[BUGFIX] Fix factor_univariate(poly, x) for constant poly.

The modular factorization fails to find a prime in this case, leading to
an infinite loop. At least one caller (factor_sqrfree) happens to produce
such constant polys in some cases.

4 years ago[BUGFIX] factor_multivariate(): respect unit...
Richard Kreckel [Wed, 29 Jul 2020 22:20:22 +0000 (00:20 +0200)]
[BUGFIX] factor_multivariate(): respect unit...

...if the content of polynomial isn't a number and needs to be factored.
And while at it, reduce the scope of a local variable.

4 years agoFix bug in power::expand() with the overall coefficient.
Vladimir V. Kisil [Mon, 27 Jul 2020 19:03:42 +0000 (21:03 +0200)]
Fix bug in power::expand() with the overall coefficient.

The negative sign of overall coefficient had been lost if a
power base contained some sign-definite factors.

4 years agoFix of a bug in sqrfree_parfrac() related to Yun factorisation.
Vladimir V. Kisil [Mon, 27 Jul 2020 18:58:27 +0000 (20:58 +0200)]
Fix of a bug in sqrfree_parfrac() related to Yun factorisation.

Yun's algorithm does not account for constant factors, thus
sqrfree_parfrac() dropped such factors in partial fractions.

4 years agoFinalize 1.7.10 release. release_1-7-10
Richard Kreckel [Sun, 28 Jun 2020 17:33:38 +0000 (19:33 +0200)]
Finalize 1.7.10 release.

4 years agoAdd exam for exam_common_factors.
Richard Kreckel [Sun, 28 Jun 2020 15:21:33 +0000 (17:21 +0200)]
Add exam for exam_common_factors.

Including a case involving a hidden zero to catch errors like the one fixed
in 5f7f81ad35a, as suggested by Alexey Sheplyakov <asheplyakov@yandex.ru>.

4 years ago[build] Check for python3 command, not python.
Richard Kreckel [Sun, 28 Jun 2020 14:07:30 +0000 (16:07 +0200)]
[build] Check for python3 command, not python.

PEP 394 does not require the python command to be installed.

4 years ago[BUGFIX] Prevent crashes in find_common_factor()
Vladimir V. Kisil [Mon, 22 Jun 2020 07:49:00 +0000 (09:49 +0200)]
[BUGFIX] Prevent crashes in find_common_factor()

These happened if a non-normalised common factor was equal to zero.

Thanks to Feng Feng for reporting this bug.

4 years agoRevert "Improve diff(abs(x)) for real x."
Richard Kreckel [Fri, 19 Jun 2020 11:34:07 +0000 (13:34 +0200)]
Revert "Improve diff(abs(x)) for real x."

This reverts commit fa1ffcfdc9da97a6fb7cc2c9c36fe1fc45c808a9.

4 years agoImprove diff(abs(x)) for real x.
Pierangelo Masarati [Wed, 17 Jun 2020 17:52:49 +0000 (19:52 +0200)]
Improve diff(abs(x)) for real x.

4 years ago[C++20] Disambiguate std::integral concept and GiNaC::integral class.
Richard Kreckel [Mon, 18 May 2020 06:26:09 +0000 (08:26 +0200)]
[C++20] Disambiguate std::integral concept and GiNaC::integral class.

4 years ago[C++20] Clean up using-declarations.
Richard Kreckel [Mon, 18 May 2020 06:22:21 +0000 (08:22 +0200)]
[C++20] Clean up using-declarations.

Never write a using-declaration before #including another header file!

4 years ago[PATCH] Add default print function as the Python printing method.
Vladimir V. Kisil [Sat, 25 Apr 2020 21:26:07 +0000 (23:26 +0200)]
[PATCH] Add default print function as the Python printing method.

4 years agoFinalize 1.7.9 release. release_1-7-9
Richard Kreckel [Fri, 10 Apr 2020 23:20:22 +0000 (01:20 +0200)]
Finalize 1.7.9 release.

4 years agoMinor enhancements to tutorial.
Richard Kreckel [Fri, 10 Apr 2020 23:10:47 +0000 (01:10 +0200)]
Minor enhancements to tutorial.

4 years agoAdd .gitignore files.
Richard Kreckel [Fri, 10 Apr 2020 23:01:47 +0000 (01:01 +0200)]
Add .gitignore files.

4 years ago[PATCH] Fix zeta(x, s).evalf() when x and s aren't lists.
Stefan Weinzierl [Fri, 10 Apr 2020 16:01:28 +0000 (18:01 +0200)]
[PATCH] Fix zeta(x, s).evalf() when x and s aren't lists.

4 years agoMake C++ files in doc/examples/ compile again.
Richard Kreckel [Thu, 9 Apr 2020 19:23:25 +0000 (21:23 +0200)]
Make C++ files in doc/examples/ compile again.

4 years agoRemove obsolete CVSROOT directory.
Richard Kreckel [Thu, 9 Apr 2020 18:44:41 +0000 (20:44 +0200)]
Remove obsolete CVSROOT directory.

4 years ago[PATCH] Check number of parameters when reading function from archive.
Richard Kreckel [Tue, 7 Apr 2020 21:56:25 +0000 (23:56 +0200)]
[PATCH] Check number of parameters when reading function from archive.

Functions where looked up by their function name in archives. However,
some functions have overloads for different numbers of parameters
('zeta', 'G', 'psi'). Reading archives could pick the wrong overload.

Fixed by requiring that the actual number of function parameters in the
archive node must equal the function's declared number of parameters.

Thanks to Feng Feng for reporting this problem.

4 years agoUpdate some compiler versions.
Richard Kreckel [Tue, 7 Jan 2020 23:03:50 +0000 (00:03 +0100)]
Update some compiler versions.

4 years agoChange www.ginac.de urls to https.
Richard Kreckel [Tue, 7 Jan 2020 22:41:40 +0000 (23:41 +0100)]
Change www.ginac.de urls to https.

4 years agoHappy New Year!
Richard Kreckel [Wed, 1 Jan 2020 11:57:25 +0000 (12:57 +0100)]
Happy New Year!

4 years ago[PATCH] numeric, ex: added constructors taking `long long`. Fixes MinGW64 build.
Alexey Sheplyakov [Thu, 12 Dec 2019 07:38:18 +0000 (08:38 +0100)]
[PATCH] numeric, ex: added constructors taking `long long`. Fixes MinGW64 build.

On 64-bit windows std::size_t is `unsigned long long` (64 bit).
However there is no ex constructor taking (unsigned) long long.

This patch adds ex and numeric constructors taking `long long`
and `unsigned long long`.

5 years agoFinalize 1.7.8 release. release_1-7-8
Richard Kreckel [Mon, 7 Oct 2019 20:23:54 +0000 (22:23 +0200)]
Finalize 1.7.8 release.

5 years agoFix bug in H_evalf: Flag has_minus_one is now computed where it is needed.
Stefan Weinzierl [Mon, 7 Oct 2019 18:32:01 +0000 (20:32 +0200)]
Fix bug in H_evalf: Flag has_minus_one is now computed where it is needed.

This bug has been reported and fixed by Yannick Ulrich <yannick.ulrich@psi.ch>.

5 years agoTrivialize pseries::eval().
Richard Kreckel [Thu, 3 Oct 2019 21:08:24 +0000 (23:08 +0200)]
Trivialize pseries::eval().

Since 1.7.0, the elements are eval()'ed, so there's nothing to do any
more for pseries::eval().

5 years agoFix pseries::evalf() regression.
Vladimir V. Kisil [Tue, 1 Oct 2019 22:00:09 +0000 (00:00 +0200)]
Fix pseries::evalf() regression.

Since f8c2455fbb, rest was not evalf()'ed any more.

5 years agoReally finalize 1.7.7 release. release_1-7-7
Richard Kreckel [Sun, 22 Sep 2019 21:50:45 +0000 (23:50 +0200)]
Really finalize 1.7.7 release.

5 years agoFinalize 1.7.7 release.
Richard Kreckel [Sun, 22 Sep 2019 21:39:06 +0000 (23:39 +0200)]
Finalize 1.7.7 release.

5 years agoReplace some .push_back() with .emplace_back() where it's safe.
Richard Kreckel [Sun, 22 Sep 2019 21:32:14 +0000 (23:32 +0200)]
Replace some .push_back() with .emplace_back() where it's safe.

5 years agoFix unarchiving empty containers.
Richard Kreckel [Sun, 22 Sep 2019 17:18:19 +0000 (19:18 +0200)]
Fix unarchiving empty containers.

The bug was reported by Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>, see
<https://www.ginac.de/pipermail/ginac-devel/2019-September/002399.html>.

5 years agoUpdate m4/ax_cxx_compile_stdcxx.m4 to current upstream version.
Richard Kreckel [Sun, 22 Sep 2019 17:02:31 +0000 (19:02 +0200)]
Update m4/ax_cxx_compile_stdcxx.m4 to current upstream version.

5 years agoRemove exhashmap<T> class.
Richard Kreckel [Sun, 22 Sep 2019 11:19:00 +0000 (13:19 +0200)]
Remove exhashmap<T> class.

Class exhashmap<T> was a workaround for missing std::hash_map<Key, T>
in the original C++98 standard. It was put in GiNaC because map<Key, T>
was deemed too slow. Since C++11 there is std::unorderd_map<Key, T>,
which is hash-based. To be able to use it, add specializations of
std::hash<ex> and std:equal_to<ex>.

5 years agoComplete documentation regarding Python 3 requirement.
Richard Kreckel [Tue, 10 Sep 2019 21:40:22 +0000 (23:40 +0200)]
Complete documentation regarding Python 3 requirement.

This was missed in the last commit.

5 years agoConvert shebangs to python3.
Richard Kreckel [Tue, 10 Sep 2019 21:29:07 +0000 (23:29 +0200)]
Convert shebangs to python3.

PEP 394 does not require the python command to be installed.

5 years ago[DOC] Additional examples on number conversions.
Vladimir V. Kisil [Sun, 9 Jun 2019 16:40:58 +0000 (18:40 +0200)]
[DOC] Additional examples on number conversions.

Some aspects of these methods are not obvious for newbies.

Signed-off-by: Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>
5 years ago[DOC] Suggest ios::binary flag for archiving files.
Vladimir V. Kisil [Sun, 9 Jun 2019 16:36:49 +0000 (18:36 +0200)]
[DOC] Suggest ios::binary flag for archiving files.

Without the flag locales setting of the OS tempers the file structure.

Signed-off-by: Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>
5 years agoFix slow numerical computation of zeta({7,3}).
Stefan Weinzierl [Tue, 4 Jun 2019 08:21:10 +0000 (10:21 +0200)]
Fix slow numerical computation of zeta({7,3}).

The bug was reported by Vitaly Magerya <vmagerya@gmail.com>, see
<https://www.ginac.de/pipermail/ginac-list/2019-May/002265.html>.

5 years agoFix crash computing zeta({7,3}) numerically.
Stefan Weinzierl [Tue, 4 Jun 2019 08:11:14 +0000 (10:11 +0200)]
Fix crash computing zeta({7,3}) numerically.

The bug was reported by Vitaly Magerya <vmagerya@gmail.com>, see
<https://www.ginac.de/pipermail/ginac-list/2019-May/002265.html>.

5 years ago[DOC] Change library order in tutorial example.
Richard Kreckel [Fri, 3 May 2019 19:14:20 +0000 (21:14 +0200)]
[DOC] Change library order in tutorial example.

Some systems care about library ordering: Dependent libraries must be
linked last. Let's link with -lginac before -lcln in the example so it
will work on any system, even on Windows.

5 years agoFinalize 1.7.6 release. release_1-7-6
Richard Kreckel [Mon, 22 Apr 2019 18:14:52 +0000 (20:14 +0200)]
Finalize 1.7.6 release.

5 years agoFix bug in mul::series() about asymptotic order term.
Richard Kreckel [Sun, 21 Apr 2019 19:43:45 +0000 (21:43 +0200)]
Fix bug in mul::series() about asymptotic order term.

This reverts db81420a6195 and adds a test case.

Thanks to Feng Feng for reporting this.

5 years agoFix cl_N output of negative fixnums.
Richard Kreckel [Thu, 4 Apr 2019 18:21:41 +0000 (20:21 +0200)]
Fix cl_N output of negative fixnums.

Thanks to Feng Feng for reporting this.

5 years agoFix bug in inifcns_nstdsums.cpp...
Stefan Weinzierl [Fri, 22 Mar 2019 09:01:30 +0000 (10:01 +0100)]
Fix bug in inifcns_nstdsums.cpp...

...related to trailing zeros in combination with user-specified signs for small
imaginary parts.

When the trailing zeros are shuffled away, the information on the signs of the
small imaginary parts has to be kept.

This bug was reported by Dmitry Chicherin.

5 years agoRefactor matrix::determinant_minor() a bit.
Richard Kreckel [Sat, 9 Mar 2019 17:40:32 +0000 (18:40 +0100)]
Refactor matrix::determinant_minor() a bit.

Remove special cases for small matrices and for for last column
minor computation. Add early return for the case that all minors
relevant for one column turn out to be zero. Improve some comments.