Commit Graph

2423 Commits

Author SHA1 Message Date
Matt Borland
5ad753c4f4 Further protect attribute to avoid warnings 2025-03-25 14:07:51 -04:00
jzmaddock
7fac807c46 Merge pull request #665 from Romain-Geissler-1A/develop
Don't use deprecated form of user-defined literal operator around BOOST_JOIN
2025-03-18 09:51:30 +00:00
Romain Geissler
2ed2ef7e40 Don't use deprecated form of user-defined literal operator around BOOST_JOIN. 2025-03-17 22:42:12 +00:00
Matt Borland
c42d8a94f1 Merge pull request #663 from Thomas-Barbier-1A/fix_deprecated_form_of_user_defined_literal_operator
Don't use deprecated form of user-defined literal operator
2025-03-17 16:20:44 -04:00
Thomas Barbier
ade2b95d37 Don't use deprecated form of user-defined literal operator 2025-03-17 17:41:35 +01:00
Konstantin Khlebnikov
49ef290b0c Suppress warnings caused by -Wimplicit-fallthrough (#660)
* Suppress warnings caused by -Wimplicit-fallthrough

* Add and replace definition of BOOST_FALLTHROUGH with MP version

---------

Co-authored-by: Matt Borland <matt@mattborland.com>
2025-03-10 11:31:23 -04:00
jzmaddock
ce3229eb23 Merge pull request #657 from FAKERINHEART/feat/fix_str
fix the mpfr stack str bug of the deadloop in the `while`
2025-02-28 19:21:49 +00:00
stanislav.mikov
716eb0e865 fix the mpfr stack str bug of the deadloop in the while 2025-02-24 17:02:57 +08:00
jzmaddock
83d5844a42 Merge pull request #651 from boostorg/switch_warn
Suppress warnings caused by use of -Wswitch_default on GCC
2025-01-20 09:44:22 +00:00
jzmaddock
bd18c8d9cc Suppress warnings caused by use of -Wswitch_default on GCC 2025-01-19 15:19:06 +00:00
jzmaddock
cec05db6f8 Merge pull request #650 from boostorg/gcc_warn
Fix some gcc-13 warnings.
2025-01-17 19:42:08 +00:00
jzmaddock
abc70a2d8c Fix some gcc-13 warnings. 2025-01-17 18:41:54 +00:00
jzmaddock
5e1db68619 Merge pull request #649 from boostorg/small_int_powers
Try and optimize small integer powers.
2025-01-17 17:37:24 +00:00
jzmaddock
d606acf98e Try and optimize small integer powers. 2025-01-17 14:41:03 +00:00
jzmaddock
ad1ee2a9a8 Merge pull request #645 from Flamefire/patch-1
GHA: Use node 20 actions
2024-12-08 09:46:09 +00:00
Alexander Grund
3ca62918cc GHA: Use node 20 actions 2024-12-07 19:24:19 +01:00
Matt Borland
92aaa55b3a Merge pull request #641 from boostorg/pgi
Disable check for `__float128` on PGI compiler
2024-11-06 08:08:44 -05:00
Matt Borland
5108a961f3 Disable for PGI compiler 2024-11-04 12:12:07 -05:00
jzmaddock
18be0ff964 Make __float128 a floating point type. (#637)
* Make __float128 a floating point type.
Allows float128 to be used in non gnu mode.
Enable some tests for non-gnu mode.
Fixes https://github.com/boostorg/multiprecision/issues/569.

Also:
* Remove msvc-14.0 testing as no longer supported.
* correct float128_snips.cpp
* Run specfun tests on github rather than CircleCI as the latter runs out of resources.
2024-09-22 13:16:20 +01:00
Matt Borland
0ab75f95ab Fix min and max usage 2024-08-06 14:42:16 -04:00
Matt Borland
b16cff21e3 Update text in example and add ability to print everything 2024-08-06 13:35:45 -04:00
Matt Borland
c2b11c1e91 Add test verification of trivially copyable 2024-08-06 13:32:38 -04:00
Nuno Nobre
320d8b7a9b Explicitly-default ctors/operators so that float128 is trivially copyable 2024-08-02 15:40:57 +01:00
Matt Borland
0f6a276756 Merge pull request #633 from boostorg/quadmath
Improve quadmath detection
2024-07-24 11:19:05 -04:00
Matt Borland
5f6780878c Fix node20 breakage 2024-07-24 08:12:12 -04:00
Matt Borland
317627c43a Improve detection of __float128 support 2024-07-24 08:11:15 -04:00
Christopher Kormanyos
1a06c2ee0c Merge pull request #629 from boostorg/update_docs
Update docs
2024-07-04 06:53:33 +02:00
Christopher Kormanyos
5985811d67 Update README.md 2024-07-03 21:48:57 +02:00
Christopher Kormanyos
61fbe1fd9a Update README.md 2024-07-03 21:46:39 +02:00
Christopher Kormanyos
41b39de2cb Update README.md 2024-07-03 21:46:21 +02:00
ckormanyos
0d73ce094a Update docs 2024-07-03 21:43:42 +02:00
jzmaddock
c0ff9cffda 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 https://github.com/boostorg/multiprecision/issues/626
2024-06-24 09:12:03 +01:00
jzmaddock
58b396288e 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 https://github.com/boostorg/multiprecision/issues/624
2024-06-21 17:14:54 +01:00
jzmaddock
f9fdcc2b31 Correct sinc implementations to match latest Boost.Math. 2024-06-15 16:05:42 +01:00
jzmaddock
7646f8ec67 Merge pull request #618 from tchaikov/convert-noexcept
make sure eval_convert_to() do not terminate with super large number
2024-05-04 17:46:20 +01:00
Kefu Chai
ea786494db make sure eval_convert_to() do not terminate with super large number
this change is a follow-up of d51f2e9dbb. 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>
2024-05-04 09:02:32 +08:00
Matt Borland
fe3054f4b8 Merge pull request #616 from boostorg/codecov
Improve codecov reliability
2024-04-24 10:27:15 +02:00
Matt Borland
6cd292e368 Split coverage into multiple runs like boost.math 2024-04-24 08:28:27 +02:00
Matt Borland
0341b9be95 Improve reliability of codecov upload 2024-04-24 08:25:53 +02:00
jzmaddock
2e81e42a0a Type which are convertible to a number should not participate in arit… (#609)
* Type which are convertible to a number should not participate in arithmetic operator overloads.
Fixes https://github.com/boostorg/multiprecision/issues/608
2024-03-07 17:23:49 +00:00
Matt Borland
ffe506aacb Merge pull request #603 from boostorg/tommath
Workaround for type change in tommath
2024-03-04 10:39:28 +01:00
Matt Borland
5675c50623 Workaround for type change in tommath 2024-03-04 08:34:36 +01:00
jzmaddock
3c9ff4d6ff Update version history.
Regenerate docs.
2024-03-03 17:56:28 +00:00
jzmaddock
438b9fc672 Merge pull request #606 from boostorg/mpfr_error_handling
Correct error handling in mpfr specfun overloads.
2024-03-02 10:14:41 +00:00
jzmaddock
fe60def8ca Correct standalone error handling. 2024-03-01 19:13:25 +00:00
jzmaddock
ab15f2f4cb Correct error handling in mpfr specfun overloads. 2024-03-01 13:13:23 +00:00
jzmaddock
42a3edf55e Merge pull request #605 from boostorg/issue604
Fix up default fmod to perform post-condition checking.
2024-03-01 13:11:32 +00:00
jzmaddock
062503f1b3 Add missing file. 2024-02-29 19:49:33 +00:00
jzmaddock
5e24597fa3 Fix up default fmod to perform post-condition checking.
Fixes https://github.com/boostorg/multiprecision/issues/604.
2024-02-29 19:18:49 +00:00
jzmaddock
f0319ec047 Trivial patches for enhanced Math tests. 2024-02-29 08:42:18 +00:00