2428 Commits

Author SHA1 Message Date
Matt Borland
903d23cbfb Eigen matrix doesn't support iterators 2024-05-17 16:21:13 +02:00
Matt Borland
ded45c0c5c Add nick's test set 2024-05-17 14:57:00 +02:00
Matt Borland
b885279d90 Delete cruft 2024-05-17 14:06:42 +02:00
Matt Borland
b437d605a9 Use SFINAE to fix C++14 build errors 2024-05-16 08:43:11 +02:00
Matt Borland
4b0d1e53c2 Fix usage of if constexpr 2024-05-15 10:28:34 +02:00
Matt Borland
411d9ea274 Remove MSVC 14.0 for boost 1.86 2024-05-15 10:27:09 +02:00
jzmaddock
7ec2760223 Add tentative polar() support and tests.
Fix a few missing using declarations.
Remove unneeded using std::polar.
2024-05-14 19:08:04 +01:00
Matt Borland
214a2d2367 Add remaining special functions 2024-05-09 11:11:32 +02:00
Matt Borland
9b3575b345 Bootstrap from existing complex class 2024-05-09 10:55:34 +02:00
Matt Borland
f9b9071a9d Add MSVC workaround for test failure 2024-05-08 12:01:33 +02:00
Matt Borland
17b815dc2e Add tanh overload 2024-05-08 11:49:34 +02:00
Matt Borland
caf7058268 Add cosh overload 2024-05-08 11:46:49 +02:00
Matt Borland
f1b88eaf5c Add sinh overload 2024-05-08 11:40:02 +02:00
Matt Borland
c560957850 Add sqrt overload 2024-05-08 11:24:25 +02:00
Matt Borland
2a5d7bb05d Add pow overload 2024-05-08 11:06:14 +02:00
Matt Borland
aa019973cd Make basic operations non-member functions 2024-05-08 10:58:50 +02:00
Matt Borland
4a35b0d229 Add log10 overload 2024-05-08 10:32:07 +02:00
Matt Borland
4abb271766 Add complex and scalar basic operations 2024-05-08 09:56:34 +02:00
Matt Borland
1c95d3a97d Add overload for log 2024-05-08 09:29:11 +02:00
Matt Borland
861c6bd8bc Add exp overload 2024-05-08 09:11:36 +02:00
Matt Borland
618bdf387e Fix test for std::sqrt promoting float result to double 2024-05-07 15:25:31 +02:00
Matt Borland
a5faa8df73 Add proj overload and fix const correctness 2024-05-07 13:09:37 +02:00
Matt Borland
8ee77ce758 Add conj overload 2024-05-07 12:49:04 +02:00
Matt Borland
20faba1051 Add norm 2024-05-07 12:39:11 +02:00
Matt Borland
e46424d495 Add arg 2024-05-07 12:35:16 +02:00
Matt Borland
d76f19bbe3 Add constexpr annotations 2024-05-07 12:20:19 +02:00
Matt Borland
21d9b25780 Add abs overload 2024-05-07 12:17:55 +02:00
Matt Borland
612f4fe2df Replace polar impl with the one from default ops 2024-05-07 12:16:21 +02:00
Matt Borland
f50f134d68 Add overloads for non-member real and imag 2024-05-07 10:51:54 +02:00
Matt Borland
0b5bd14993 Add the istream operator 2024-05-07 10:29:28 +02:00
Matt Borland
dbbc941293 Add the ostream operator 2024-05-07 10:21:24 +02:00
Matt Borland
b714bb29bb Add equality 2024-05-07 10:13:35 +02:00
Matt Borland
f61a9e1a97 Have std::complex inherit from multiprecision number class 2024-05-07 09:55:33 +02:00
Matt Borland
2df271ff39 Specialize class 2024-05-06 12:19:38 +02:00
Matt Borland
564ce77847 Add unary operators 2024-05-06 10:59:08 +02:00
Matt Borland
2a688a5fa0 Restrict to boost.mp types 2024-05-06 10:38:31 +02:00
Matt Borland
8e82bbb6dd Add class basis 2024-05-06 10:30:07 +02:00
Matt Borland
1f98503b50 Add test set 2024-05-06 10:29:54 +02:00
Matt Borland
5073b38145 Add better cmake support 2024-05-06 09:15:50 +02: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