]> www.ginac.de Git - ginac.git/commit
Fix internal next_prime(n) function.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 22 Dec 2022 17:19:59 +0000 (18:19 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 22 Dec 2022 17:31:49 +0000 (18:31 +0100)
commit4fd717045b56a15ee8602dfd005d7362db738d0a
tree0bc36fb53fe7b775d6a8deb36b50f8b17f4c38bf
parent35a742a26893a534ddf1e51bd6d08f09dc927c43
Fix internal next_prime(n) function.

This helper function was doing wild things when called the wrong way.
E.g. it would allocate obscene amounts of memory and run for ages when
called with an argument that has never been returned by it before.

In the context where it's being used so far this is not a problem. But
it's better to make it foolproof and spare a new user some possible
despair and distress.
ginac/factor.cpp