Skip to content

Replace older Boost math with std C++. Update error reporting for CoinMP - #496

Merged
asf-gitbox-commits merged 4 commits into
apache:trunkfrom
pgiffuni:trunk
Aug 28, 2026
Merged

Replace older Boost math with std C++. Update error reporting for CoinMP#496
asf-gitbox-commits merged 4 commits into
apache:trunkfrom
pgiffuni:trunk

Conversation

@pgiffuni

Copy link
Copy Markdown
Contributor

The solver component was made originally for lp_solve, which did basically the same as CoinMP, but handled differently some errors, in particular timeouts.

Be more in line with CoinMP error reporting. By the way we set up the problem internally it is unlikely some of these will come up but defining them will make easier to understand what could go wrong.

The solver component was made originally for lp_solve, which did basically
the same as CoinMP, but handled differently some errors, in particular
timeouts.

Be more in line with CoinMP error reporting. By the way we set up the problem
internally it is unlikely some of these will come up but defining them will
make easier to understand what could go wrong.
At first many of these calculations were handwritten and could overflow.
Later we started using the available Boost for some edge cases which was
a good solution to make up for the lack of such function in some of the
supported platforms.

The latest versions of Boost though, are deprecating Boost complex functions
in favor of the C++ standard library and its now time to catch up.

As a result of this change, the results of IMSECH and IMCSCH don't match
the examples in the the help but matches the results in Excel.
…parts.

For the cases of acosh, asinh, atanh, expm1 and log1p we were making use
of the Boost library which was/is available and of good quality. Nowadays
these are included in all reasonable standard C++ libraries and it makes
sense to use them for consistency.
Confirmed with external software:
IMSECH("3+4j") = -0.065294027857947 + 0.075224960302773 i
IMCSCH("3+4j") = -0.064877471370636 + 0.075489832915864 i
@pgiffuni

Copy link
Copy Markdown
Contributor Author

This has all been tested on FreeBSD.

@pgiffuni pgiffuni changed the title calc/solver: Update error reporting for CoinMP Replace older Boost math with std C++. Update error reporting for CoinMP Aug 27, 2026
@asf-gitbox-commits
asf-gitbox-commits merged commit 4cf5e4e into apache:trunk Aug 28, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants