Matt Borland
5ebeddef31
Simplify fmax type promotion logic
2023-01-03 14:29:29 +01:00
Matt Borland
d27c7f43e6
Improve handling of NANs in fmax
2023-01-03 14:28:21 +01:00
Matt Borland
51fb875730
Simplify fmin type promotion logic
2023-01-03 14:25:00 +01:00
Matt Borland
a10abc2767
Improve handling of NANs in fmin
2023-01-03 14:21:58 +01:00
Matt Borland
c6e8d0e6eb
Improve handling of NANs in hypot
2023-01-03 14:13:53 +01:00
Matt Borland
c7513bea7d
Improve handling of NANs in logb
2023-01-03 14:05:09 +01:00
Matt Borland
fb21f21822
Improve handling of NANs in sqrt
2023-01-03 13:58:01 +01:00
Alexander Grund
c91659e368
Use size_t in size_to_precision
...
As the trait is supposed to be called with `sizeof` the type should be `size_t`
This avoids a conversion warning on e.g. GCC until 10.4
2022-12-28 13:50:52 +01:00
jzmaddock
6ab71df84a
Fix tanh_sinh warnings.
...
Introduced in previous fix.
2022-12-15 17:48:50 +00:00
jzmaddock
0b56a468a9
Make integrators const correct.
...
Update tests accordingly.
2022-12-15 17:38:36 +00:00
jzmaddock
c55e6856b6
Fix tanh_sinh integration for edge case,
...
where max_left_index/max_right_index may go to zero if the function being integrated overflows the FP type being used across nearly all of it's range. Fixes https://github.com/boostorg/math/issues/898
2022-12-11 13:11:08 +00:00
Rose
dbb1ae7667
Use cfloat instead of float.h
...
It would be more consistent to use the C++ headers instead of the C ones.
2022-12-09 11:07:42 -05:00
Matt Borland
979d5931dd
Merge pull request #888 from boostorg/885-no-cbrt
...
Remove using std::cbrt to fix build on platforms which don't support it.
2022-12-05 07:11:55 -08:00
Matt Borland
5c1392176c
Fix FE_INVALID in quantile
2022-12-04 12:52:52 -08:00
Matt Borland
0ec83bcb3a
Fix FE_INVALID in non-central t CDF
...
[ci skip]
2022-12-04 12:29:17 -08:00
Matt Borland
fc88a11289
Fix for binomial distribution quantile edge case
2022-12-03 09:49:29 -08:00
Nick Thompson
3d6a7fb832
Remove using std::cbrt to fix build on platforms which don't support it.
2022-12-03 07:55:21 -08:00
Matt Borland
4e77917d85
Merge pull request #864 from mborland/warnings
...
Fix warnings in special functions
2022-11-29 08:42:26 -08:00
jzmaddock
20fc2addea
More and better handling of ibeta small args.
2022-11-27 19:14:14 +00:00
jzmaddock
ea70672db7
Fix gcc -fno-exception build.
2022-11-26 09:20:37 +00:00
jzmaddock
c6fccc286e
Correct concept failures.
2022-11-25 19:51:00 +00:00
jzmaddock
18fd65aaa1
Make inverses overflow safe.
2022-11-25 17:45:01 +00:00
jzmaddock
8add2b4373
Correct handling of NaN's and infinities in ibeta.
...
Update tests.
Fixes https://github.com/boostorg/math/issues/878
2022-11-25 17:08:58 +00:00
jzmaddock
aad4f85955
Improve powm1 error handling.
...
Makes 0^-n an overflow error (which matches std::pow which returns +INF rather than a NaN).
Fixes https://github.com/boostorg/math/issues/781 .
2022-11-24 18:43:32 +00:00
Matt Borland
23b1fba8e7
Fix -Wimplicit-const-int-float-conversion ( #879 )
2022-11-15 18:45:22 -08:00
jzmaddock
2cdabeb30e
Merge pull request #875 from boostorg/issue873
...
Correct root finders in extreme cases.
2022-11-15 09:00:39 +00:00
jzmaddock
9a9bb9ddc8
Update root bracketing to home in faster.
...
Special case for when the exponent range is so large that it basically takes "forever" to bracket otherwise.
2022-11-13 17:08:19 +00:00
Matt Borland
03ac231b83
Fix for issue #871 ( #872 )
2022-11-13 07:25:12 -08:00
Brian Wignall
1923ba5c75
Fix typos ( #876 )
2022-11-12 17:16:53 -08:00
jzmaddock
fbb4398683
Correct root finders in extreme cases.
...
Fixes: https://github.com/boostorg/math/issues/873
2022-11-11 19:36:24 +00:00
jzmaddock
4631716f66
s/constructable/constructible/
...
[CI SKIP]
2022-11-10 18:49:37 +00:00
Rose
fe48a3bba7
Junk removal
...
Removal of junk headers, typos, or mistakenly duplicated keywords
2022-11-05 12:14:12 -04:00
jzmaddock
cb326912f5
Merge pull request #856 from boostorg/norms
...
Assert when features which require C++17 are compiled for an earlier …
2022-11-04 17:06:15 +00:00
Rose
b08aa05069
Use 64-bit RNG for types that are 64 bits ( #865 )
...
Do this instead of casting down every time we do a normal distribution.
2022-11-04 09:20:51 -07:00
Matt Borland
9d15701d11
Fix warning C4305: 'initializing': truncation from 'double' to 'Real'
2022-10-30 18:06:08 -07:00
Matt Borland
00bb718a9c
Fix warning C4244: 'initializing': conversion from 'double' to 'T'
2022-10-30 18:06:08 -07:00
Matt Borland
5f15252ea0
Fix warning C4244: conversion from 'double' to 'T'
2022-10-30 18:06:08 -07:00
Matt Borland
192954be68
Fix warning C4244: 'initializing': conversion from 'double' to 'T'
2022-10-30 18:06:08 -07:00
Matt Borland
94201a88ba
Use numeric_limits<T>::is_signed to support Boost.MP types
2022-10-29 16:25:39 -07:00
Matt Borland
2acd1d62bf
Fix warning C4244: 'return': conversion from 'int' to 'T'
2022-10-29 16:25:39 -07:00
Matt Borland
548118a735
Fix warning C4146: unary minus operator applied to unsigned type
2022-10-29 16:25:39 -07:00
Matt Borland
61c4e3b03e
Disable C6326: Potential comparison of a constant with another constant
2022-10-25 18:59:04 -07:00
jzmaddock
86c24916b2
Assert when features which require C++17 are compiled for an earlier C++ version.
...
Also document C++17 requirement for norms.
2022-10-25 18:51:29 +01:00
Matt Borland
53534c5505
Fix for scipy issue 17146 ( #847 )
...
See: https://github.com/scipy/scipy/issues/17146
2022-10-17 17:54:46 -07:00
Matt Borland
dfdb50caca
Fix for issue 845 ( #846 )
...
* Fix for issue 845
Avoid division by zero in special cases
2022-10-17 13:52:56 -07:00
Matt Borland
9da3a0abb0
Fix warnings in quadrature tests ( #844 )
2022-10-16 07:51:52 -07:00
Rose
a978d95d8d
Change looping over array to be unsigned ( #830 )
2022-10-13 07:06:46 -07:00
Nicholas McKibben
7ad016f34b
short-circuit overflow protection for M1 Mac clang ( #827 )
...
xref scipy/scipy#14901
Splits single if statement into two to avoid apparent clang short-circuit bug on M1 Mac platforms.
Co-authored-by: Matt Borland <matt@mattborland.com >
2022-10-12 15:03:13 -07:00
Rose
2a07116411
Fix bytes behavior ( #828 )
...
"this" is a pointer, not a reference, so we need to find the size of the referenced object.
2022-10-12 08:27:42 -07:00
Rose
38034fa576
Fix Clang-15 warnings ( #831 )
...
Redundant casts, noexcept for move constructors, and usage of default and delete make the code more performant and maintainable.
2022-10-09 19:18:24 +01:00