Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge for 1.86 #628

Merged
merged 8 commits into from
Jul 2, 2024
Merged

Merge for 1.86 #628

merged 8 commits into from
Jul 2, 2024

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    0341b9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6cd292e View commit details
    Browse the repository at this point in the history
  3. Merge pull request #616 from boostorg/codecov

    Improve codecov reliability
    mborland authored Apr 24, 2024
    Configuration menu
    Copy the full SHA
    fe3054f View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. make sure eval_convert_to() do not terminate with super large number

    this change is a follow-up of d51f2e9. it intends to
    address the exception thrown in a noexcept functon.
    
    a minimal reproducer looks like
    
    ```c++
    
    int main() {
        std::string s = "32767456456456456456545678943512357658768763546575675";
        boost::multiprecision::cpp_int num(s);
        std::cout << num.convert_to<float>() << std::endl;
    }
    ```
    
    since boost 1.79, the code above terminates like
    ```
    Program returned: 139
    Program stderr
    terminate called after throwing an instance of 'boost::wrapexcept<std::domain_error>'
      what():  Error in function float_next<float>(float): Argument must be finite, but got inf
    Program terminated with signal: SIGSEGV
    ```
    
    because `float_next_imp()` throws 'boost::wrapexcept<std::domain_error>'
    if the number is NAN of INF. and `eval_convert_to()` is marked as
    `noexcept(boost::multiprecision::detail::is_arithmetic<R>::value &&
              std::numeric_limits<R>::has_infinity)`,
    but only `overflow_error` is ignored in the policy passed to
    `float_next()`.
    
    so, in this change, `std::domain_error` is ignored as well, so that
    ``num.convert_to<float>()` returns a NaN in this case.
    
    Refs #553
    
    Signed-off-by: Kefu Chai <tchaikov@gmail.com>
    tchaikov committed May 4, 2024
    Configuration menu
    Copy the full SHA
    ea78649 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #618 from tchaikov/convert-noexcept

    make sure eval_convert_to() do not terminate with super large number
    jzmaddock authored May 4, 2024
    Configuration menu
    Copy the full SHA
    7646f8e View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2024

  1. Configuration menu
    Copy the full SHA
    f9fdcc2 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

  1. Correct divide-by-zero in cpp_int modulus operations. (#625)

    Correct divide-by-zero in cpp_int modulus operations.
    Also added some more efficient operator overloads for the trivial case.
    Fixes #624
    jzmaddock authored Jun 21, 2024
    Configuration menu
    Copy the full SHA
    58b3962 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. Ensure checked integers are in a sane state after a throw. (#627)

    Ensure checked integers are in a sane state after a throw.
    Document that the value of the target operand is unspecified after a throw.
    Improve testing.
    Fixes #626
    jzmaddock authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    c0ff9cf View commit details
    Browse the repository at this point in the history