2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-27 07:02:08 +00:00
Commit Graph

2819 Commits

Author SHA1 Message Date
Matt Borland
991fcff33d constexpr floor and ceil (#694) 2021-09-20 09:51:59 -07:00
Matt Borland
4ad861217d constexpr scalbn and scalbln (#693) 2021-09-18 10:12:47 -07:00
Matt Borland
c0383edcea Constexpr logb and ilogb 2021-09-17 21:05:07 +03:00
Matt Borland
3b75b350a4 constexpr div (#691) 2021-09-15 11:51:06 -07:00
jzmaddock
e592fae531 Merge pull request #690 from mborland/constexpr_abs_overloads
Add abs specializations to ccmath
2021-09-12 16:40:52 +01:00
Matt Borland
5f48b50848 Add abs specializations to ccmath 2021-09-11 21:44:18 +03:00
Matt Borland
5190e5934e Simplify implementation 2021-09-11 20:59:17 +03:00
Matt Borland
a8cdcd85b1 Remove unneeded includes 2021-09-06 21:40:04 +03:00
Matt Borland
000aaae2d1 Add testing 2021-09-06 21:39:51 +03:00
Matt Borland
0a69c93a31 Initial commit 2021-09-06 21:39:35 +03:00
Matt Borland
0bbea8d8f9 constexpr frexp (#686) 2021-09-06 11:27:27 -07:00
jzmaddock
7d482f6ebc Make no atomics a soft failure in bernoulli_details.hpp.
Include an "escape macro" so thread safety can be disabled if certain bernoulli features are to be used in a no-atomics environment.
Fixes https://github.com/boostorg/math/issues/673.
2021-09-01 20:31:53 +01:00
jzmaddock
32bd619735 Allow definition of BOOST_MATH_NO_ATOMIC_INT on the command line.
Allows us to test/emulate platforms with no atomic integers.
2021-09-01 18:54:54 +01:00
Christopher Kormanyos
be0c78bb4c Add a few more cstdfloat 128-bit tests 2021-08-30 19:04:44 +02:00
Christopher Kormanyos
670b5c4ee9 More edge ranges and optimize expq patch 2021-08-30 13:47:57 +02:00
Christopher Kormanyos
36fce1488d Merge branch 'develop' into i506_cstdfloat_complex_std 2021-08-28 16:05:56 +02:00
Matt Borland
d8fe127b82 constexpr fpclassify (#679)
* Implement fpclassify and tests
2021-08-25 13:43:43 -07:00
Stephan T. Lavavej
88c4b8d661 Fix standalone endianness macros. (#678)
* Fix comment typos: "endinaness" to "endianness"
* Change the C++20 checks (for both `__cplusplus` and `_MSVC_LANG`)
  to be strict: `> 202000L` to `>= 202002L`
* Add an `#error` when C++20 `<bit>` is missing, just in case.
* Fix the `_WIN32` definitions. All Windows platforms are little-endian
  (regardless of x86/x64/ARM/ARM64), `<boost/predef/other/endian.h>`
  correctly reports little-endian, and MSVC's STL simply hardcodes
  `enum class endian { little = 0, big = 1, native = little };`, see
  f75c7f596c/stl/inc/bit (L271) .
* Add a `static_assert` to verify that exactly one of
  `BOOST_MATH_ENDIAN_BIG_BYTE` or `BOOST_MATH_ENDIAN_LITTLE_BYTE` is
  true. This avoids the need for "Endian type could not be identified"
  consistency checks below.
* Fix boostorg/math#677 by not testing `BOOST_MATH_ENDIAN_BIG_BYTE` and
  `BOOST_MATH_ENDIAN_LITTLE_BYTE` with the preprocessor, as
  `std::endian::native` isn't a preprocessor constant. Now, this simply
  expects `BOOST_MATH_ENDIAN_BIG_BYTE` to be usable in a constant
  expression, and assumes (due to the consistency check above)
  that if we aren't big-endian, we must be little-endian.
2021-08-24 07:36:43 -07:00
Matt Borland
a4d5ae7177 Constexpr isfinite and isnormal (#674) 2021-08-23 21:47:41 -07:00
Matt Borland
720536a08e Fix for issue 675 (#676) 2021-08-23 07:48:28 -07:00
Matt Borland
564967785f Constexpr abs/fabs (#672)
* Initial commit

* Move error handling to impl

* Validate tests for float

* Test other types

* Add tests for types that are convertible to int

* Add include test

* Update docs

* Add fabs overloads

* Add fabs to docs

* Add missing header to tests

* Fix for old versions of clang and cleanup naming conventions

* Update jamfile

* Add glibcxx constexpr cmath tests and fix docs

* Use equality in testing instead of tolerance
2021-08-16 22:08:12 -07:00
jzmaddock
19c2759f2b Merge pull request #667 from mborland/constexpr_sqrt
Constexpr sqrt
2021-08-11 19:17:31 +01:00
jzmaddock
4bf517ddee Merge pull request #645 from vindex10/feature/noncentral_chi2_starting_point
improve mode of the non central chi squared algorithm
2021-08-03 17:43:51 +01:00
jzmaddock
e2cb654c99 Fix duplicate typedef in mp.hpp 2021-08-02 18:33:03 +01:00
Matt Borland
70d494d76a Disable some float128 tests and add C++17isms 2021-07-31 15:48:34 +03:00
Matt Borland
a52c415314 Fixes for MSVC 14.2 failure 2021-07-30 21:27:58 +03:00
Victor Ananyev
8534c06315 fix ternary type inconsistency 2021-07-30 11:01:05 +02:00
Victor Ananyev
97cc1ba7f6 improve mode of the non central chi squared algorithm 2021-07-30 11:01:05 +02:00
Daniel Scharrer
1ec5c98d80 Fix #include inside boost namespace
The existing code fails to build if <utility> was not already included.
2021-07-28 19:56:31 +02:00
kojiynet
67d25f4a40 Type cast (to suppress warnings) (#669) 2021-07-25 11:29:58 -07:00
Matt Borland
6b46545882 Fixes and add testing of float128 support 2021-07-25 21:19:08 +03:00
Matt Borland
36f2753c78 Change isinf and sqrt impls based on constexpr context [ci skip] 2021-07-24 15:46:30 +03:00
Matt Borland
b73d44efcf Use std::isnan in non-constexpr contexts [ci skip] 2021-07-24 15:40:50 +03:00
Matt Borland
084bc7184b Merge remote-tracking branch 'origin/develop' into constexpr_sqrt 2021-07-24 14:29:58 +03:00
Matt Borland
a6d049b075 Transplant is_constant_evaluated impl from MP [ci skip] 2021-07-23 22:04:33 +03:00
Matt Borland
98b0cf1f11 Doc fixes and convert to C++17 format [ci skip] 2021-07-23 22:03:31 +03:00
Nick
6b949ee298 Fix for #664 (#665)
* Fix for #664

* Convert bivariate_statistics test to math_unit_test; update unit tests for constant vector + non-constant.

Committer: Nicholas Thompson <nathompson7@protonmail.com>

* Return NaN if either dataset is constant.

* Fix in one other spot.

* Use math::test::report_errors() everywhere.

* Correct unit tests for the parallel case.

Co-authored-by: Nicholas Thompson <nathompson7@Nicholass-MacBook-Pro.local>
2021-07-22 10:43:56 -07:00
Matt Borland
30b4d23f20 Add documentation 2021-07-20 21:06:32 +03:00
Matt Borland
b6e2e812c4 Line ending 2021-07-18 20:28:41 +03:00
Matt Borland
8de7139b02 Revert rsqrt changes 2021-07-18 20:26:43 +03:00
Matt Borland
0eb7d247a4 Add include tests 2021-07-18 15:12:50 +03:00
Matt Borland
708c27dfe4 Refactoring 2021-07-18 14:56:56 +03:00
jzmaddock
96cd133605 Simplify noexcept requirement. 2021-07-15 19:44:18 +01:00
Matt Borland
78db77787d Increase robustness 2021-07-11 09:37:27 +03:00
Matt Borland
7c8ee612d3 Allow for constexpr rsqrt in certain contexts 2021-07-10 15:02:53 +03:00
Matt Borland
9677ed0a0a Cleanup 2021-07-10 12:38:51 +03:00
Matt Borland
56bdc98e41 Implement constexpr sqrt 2021-07-10 12:34:55 +03:00
Matheus Castanho
c80aa8169e Fix build on platforms with "double-double" long double type
Since commit 01f3b7d772 most tests started to fail on platforms that use a
"double-double" for long double, like powerpc64le:

../../../boost/math/tools/precision.hpp:148:137: error: expected primary-expression before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected ‘)’ before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

../../../boost/math/tools/precision.hpp:148:137: error: expected initializer before ‘long’
  148 | inline constexpr long double epsilon<long double>(const std::true_type&
  BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double)

Fix this by replacing the noexcept expression with the contents of
BOOST_MATH_NOEXCEPT, which was the intention of commit 01f3b7d772.
2021-07-07 16:33:11 -03:00
Jan Blumschein
e149c34008 nonfinite_num_get facet fix: honour "legacy" flag to enable "nanq" and "nans" (#640)
Fix 16c57be3 "Fixes for compile tests" (make compiler happy, but lose
flag semantics) as well as the original implementation from e3e838da
(obvious intention, but wrong operator).
2021-07-05 17:20:58 -04:00
Matt Borland
90a867cf72 Add standalone testing to bezier polynomials (#658) 2021-07-04 13:39:35 -07:00