Replace older Boost math with std C++. Update error reporting for CoinMP - #496
Merged
Conversation
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
Contributor
Author
|
This has all been tested on FreeBSD. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.