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 to master for 2.1.0 #698

Merged
merged 207 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
11146eb
Tune cover flags and log10
ckormanyos May 31, 2024
5bf1fe5
Get ellint_1 working but tols are rather high
ckormanyos May 31, 2024
d7f3035
Remove an unused variable
ckormanyos May 31, 2024
967c6aa
Adjust parameters and tolerances
ckormanyos May 31, 2024
909df3d
Simplify and reduce tols and increase range
ckormanyos May 31, 2024
373d957
Restore original tols but phi near 1 needed
ckormanyos May 31, 2024
4b2d69b
Correct test case number typo
ckormanyos May 31, 2024
a3927f5
More of ellint_1 works but lots still TODO
ckormanyos Jun 1, 2024
a1b3686
Syntax and typos and more TODO notes
ckormanyos Jun 1, 2024
4cb061c
Add a cast and extend ranges
ckormanyos Jun 1, 2024
c245b37
Handle syntax and compiler warning
ckormanyos Jun 1, 2024
01a0794
Prelim impl and tests for ellint_2
ckormanyos Jun 1, 2024
81d916e
128 bit tests and remove limits on phi
ckormanyos Jun 1, 2024
6df0920
Synchronize testing ellint 1/2
ckormanyos Jun 1, 2024
19a492c
Finish ellint_a tests
ckormanyos Jun 2, 2024
b8ea81d
Clean up ellint_1/2 tests
ckormanyos Jun 2, 2024
d894e69
Clean up ellint tests and handle warning
ckormanyos Jun 2, 2024
6002540
Reduce test-strict with TODO increase later
ckormanyos Jun 2, 2024
cb10d4c
Streamline ellint_1/2 tests
ckormanyos Jun 2, 2024
bd4c60f
Preliminary better AGM iter-break check
ckormanyos Jun 3, 2024
d9f35cd
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 3, 2024
cffe22f
Close to get ellint but tiny edge fluff remains
ckormanyos Jun 3, 2024
dbece31
Merge branch 'ellint_improvements' of https://github.com/cppalliance/…
ckormanyos Jun 3, 2024
7cf43f7
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 3, 2024
a6c9665
Further ellint improve but sporadic fail still
ckormanyos Jun 6, 2024
56d0c3a
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 6, 2024
1f0c353
Improve small-phi approximations
ckormanyos Jun 6, 2024
dc3d2b2
More tan, atan and ellint but still needs work
ckormanyos Jun 8, 2024
83d4ea0
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 8, 2024
0eca1c2
Prelim fix ellint tests with still some TODOs
ckormanyos Jun 8, 2024
875c44f
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 11, 2024
53aa3ee
Correct a typo from merge conflict
ckormanyos Jun 13, 2024
9f3079b
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 13, 2024
986cb51
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 15, 2024
f7ae907
Finish ellint 1/2 and improve tan()
ckormanyos Jun 19, 2024
79ddf84
Merge branch 'develop' into ellint_improvements
ckormanyos Jun 19, 2024
b37b934
Remove unnecessary change
ckormanyos Jun 19, 2024
1e7b7e9
Correct unused variable and typos
ckormanyos Jun 19, 2024
ef886e5
Synchronize ellint 1 and 2 tests
ckormanyos Jun 19, 2024
54fa90a
Repair typo and local-run millions ellint_2 tests
ckormanyos Jun 19, 2024
cee3df5
Merge pull request #624 from cppalliance/ellint_improvements
ckormanyos Jun 19, 2024
ca9b167
Remove normalization
mborland Jun 18, 2024
ae6939b
Change max significand for decimal128_fast
mborland Jun 18, 2024
8157692
Fix normalization
mborland Jun 18, 2024
3843db1
Add easily debugged spot tests
mborland Jun 18, 2024
63f885e
Add table with uint256_t powers of 10
mborland Jun 17, 2024
f4136cb
Add 256 bit table lookup function
mborland Jun 18, 2024
1a81615
Add separate d128_fast mul impl
mborland Jun 19, 2024
51e422e
Change function calls
mborland Jun 19, 2024
b488f76
Enable testing of beta for decimal128_fast
mborland Jun 19, 2024
395ec49
Fix C++14 linker errors for special functions
mborland Jun 19, 2024
c011208
Fix type error
mborland Jun 19, 2024
d9dc532
Merge pull request #662 from cppalliance/better_mul_4
mborland Jun 19, 2024
b865070
Improve elliptic integrals coverage
ckormanyos Jun 20, 2024
02392af
Merge branch 'develop' into ellint_coverage
ckormanyos Jun 20, 2024
43525f2
Synchronize ellint_1/2 and exclude non-cover
ckormanyos Jun 20, 2024
84ad22b
Remove unneeded calculation of modulus from division
mborland Jun 20, 2024
7aceda2
Merge pull request #666 from cppalliance/ellint_coverage
ckormanyos Jun 20, 2024
b8761cc
Merge pull request #667 from cppalliance/div
mborland Jun 20, 2024
47f3382
Cover beta nan line
mborland Jun 20, 2024
04a2270
Add sin and cos coverage
mborland Jun 20, 2024
e1fb249
Fix from chars throwing away extra digits
mborland Jun 20, 2024
d4db71a
Add tgamma testing
mborland Jun 20, 2024
e9fd8e0
Add conversions testing
mborland Jun 20, 2024
8108736
Cover non-finite maths
mborland Jun 20, 2024
16666b7
Exclude unlikely code path
mborland Jun 20, 2024
385e993
Add parser testing
mborland Jun 20, 2024
e56e55a
Invalid if fixed format contains an exponent
mborland Jun 20, 2024
2040c15
Fix handling of fixed precision
mborland Jun 20, 2024
70a2d8b
Add unreachable return
mborland Jun 20, 2024
f6f2da2
Ignore MSVC warning unreachable return
mborland Jun 20, 2024
35b7bfe
Change invalid buffer
mborland Jun 20, 2024
277d7b3
Reduce number of comparisons
mborland Jun 20, 2024
5c82fc7
Include invalid value testing
mborland Jun 20, 2024
101fad2
Tiny charconv defect and more trig tests
ckormanyos Jun 21, 2024
97499ec
Add more tgamma tests
ckormanyos Jun 21, 2024
8633ea6
Remove a misplaced cast
ckormanyos Jun 21, 2024
d059895
Warnings and more tests
ckormanyos Jun 21, 2024
4d866da
Change handling for MSVC unreachable code
mborland Jun 21, 2024
ba5ee50
Add more tgamma tests
ckormanyos Jun 21, 2024
e6ae991
Change MSVC unreachable macros locations
mborland Jun 21, 2024
2f1a6b1
Merge branch 'coverage' into funcs_and_cover
ckormanyos Jun 21, 2024
80b56e5
Merge branch 'coverage' into funcs_and_cover
ckormanyos Jun 21, 2024
011c1fc
Replace NaN types for invalid arguments
mborland Jun 21, 2024
dd77132
Remove guardrail since boost.charconv issue is fixed
mborland Jun 21, 2024
1181404
Merge branch 'coverage' into funcs_and_cover
ckormanyos Jun 21, 2024
062d574
Merge pull request #671 from cppalliance/qnan
mborland Jun 21, 2024
47e6795
Merge branch 'develop' into funcs_and_cover
ckormanyos Jun 21, 2024
7046e61
Merge pull request #669 from cppalliance/coverage
mborland Jun 21, 2024
a34f819
Merge branch 'develop' into funcs_and_cover
ckormanyos Jun 21, 2024
9089bcb
Add some tgamma() tests
ckormanyos Jun 22, 2024
9b87c2c
Add more tests for and simplify pow()
ckormanyos Jun 22, 2024
3565e06
Correct comment typos
ckormanyos Jun 22, 2024
5b393f6
Handle erroneously unused variables
ckormanyos Jun 22, 2024
eb7f5db
Merge pull request #670 from cppalliance/funcs_and_cover
ckormanyos Jun 22, 2024
0b59517
Remove repeated operations in decimal32 division
mborland Jun 21, 2024
32137ce
Remove repeated operations in decimal64 division
mborland Jun 21, 2024
7ef2010
Simplify 32 bit addition
mborland Jun 21, 2024
0dd9002
Simplify 64 bit addition
mborland Jun 21, 2024
da78a23
Slightly simplify 32 bit subtraction implementation
mborland Jun 21, 2024
6ca21c6
Fix potential overflow in decimal32 mixed type addition
mborland Jun 21, 2024
84581d9
Add additional typedefs
mborland Jun 21, 2024
a6101b9
Apply new sub impl to addition
mborland Jun 21, 2024
211a43d
Simplify 32 bit subtraction
mborland Jun 21, 2024
1c1b444
Fix and simplify decimal32_fast subtraction
mborland Jun 21, 2024
643450d
Add additional typedefs
mborland Jun 21, 2024
8482088
Simplify 64 bit operator-
mborland Jun 24, 2024
bb43e59
Further simplification to operator+
mborland Jun 24, 2024
76f7130
Simplify 64-bit sub impl
mborland Jun 24, 2024
e52ede3
Add decimal64_fast riemann zeta testing
mborland Jun 24, 2024
ead73a3
Fix linker error
mborland Jun 24, 2024
2a7dec6
Further changes to decimal64_fast operator+
mborland Jun 24, 2024
07ec0e5
Simplify decimal64_fast operators-
mborland Jun 24, 2024
b293a74
Add basic operator significand promotion function
mborland Jun 24, 2024
376aae9
Add a conditional significantly simpler mul_impl
mborland Jun 24, 2024
2ad339c
Improve decimal32_fast operator*
mborland Jun 24, 2024
85aedca
Improve decimal32 operator*
mborland Jun 24, 2024
f89b3d8
Add simplified 64 bit mul impl
mborland Jun 24, 2024
30e4acf
Simplify operators*
mborland Jun 24, 2024
61405c5
Fix normalization of 0s
mborland Jun 24, 2024
4624fc9
Fix decimal64_fast type errors
mborland Jun 24, 2024
5d6817c
Make exp a template type
mborland Jun 24, 2024
e2b7832
Disable FMAs for now since they need reworked
mborland Jun 24, 2024
f1d524d
Fix old clang conversion
mborland Jun 24, 2024
2688bdf
Remove workaround code path
mborland Jun 24, 2024
457cc1c
Simplify value of sign
mborland Jun 24, 2024
de73cbc
Fix narrowing conversions
mborland Jun 25, 2024
adc6657
Add typedefs to 128 bit types
mborland Jun 25, 2024
0730545
Fix more conversions
mborland Jun 25, 2024
cc5cff4
Fix conversions in decima128_fast
mborland Jun 25, 2024
d1b0087
Add template type for exponent
mborland Jun 25, 2024
016d1d8
Add single division to keep from digit counting a uint128
mborland Jun 25, 2024
a8f3259
Speed up mul_impl for decimal32 and add additional impl for dec32_fast
mborland Jun 25, 2024
3ca6e64
Change intermediate mul type for clang 6-12
mborland Jun 25, 2024
7255a0a
Additional old clang workaround
mborland Jun 25, 2024
2616fdd
Fix handling of signed 0
mborland Jun 25, 2024
b7163d8
Fix testing of signed 0s
mborland Jun 25, 2024
49631b1
Fix type of exp
mborland Jun 25, 2024
cdf9ffa
Further clang workarounds
mborland Jun 25, 2024
f6fa637
Change division type for old clangs
mborland Jun 26, 2024
87523d8
Merge pull request #677 from cppalliance/better_basics
mborland Jun 26, 2024
f0b05bb
Allow privileged access
mborland Jun 26, 2024
8d6d270
Merge pull request #682 from cppalliance/privilege
mborland Jun 26, 2024
0c8503d
Reduce steps in decimal128_fast mul
mborland Jun 25, 2024
f57d100
Improve 128-bit sub impl
mborland Jun 26, 2024
83e28d0
Remove duplicate ops from operator+
mborland Jun 26, 2024
e7a9e6d
Rename macro
mborland Jun 26, 2024
c1e7ec8
Offer branchless uint128 operator+ on x64 machines
mborland Jun 26, 2024
51a6144
Improve uint128 operator- on x64 machines
mborland Jun 26, 2024
3c19c48
Remove duplicate ops in operator*
mborland Jun 26, 2024
09b32f2
Remove duplicate struct
mborland Jun 27, 2024
6da7aad
Remove investigated TODO
mborland Jun 27, 2024
3fa2bfd
Simplify operator+
mborland Jun 27, 2024
162b07d
Simplify operators-
mborland Jun 27, 2024
2a65bb7
Simplify operators*
mborland Jun 27, 2024
51b5519
Operator/ simplification
mborland Jun 27, 2024
b1cdaf1
Further simplifications to avoid copies
mborland Jun 27, 2024
8c05027
Refactor to avoid copies and improve readability
mborland Jun 27, 2024
ced54d4
Avoid copies and improve readability
mborland Jun 27, 2024
91e935d
Avoid copies and improve readability
mborland Jun 27, 2024
58037a9
Avoid copies and improve readability
mborland Jun 27, 2024
ba77d62
Triple speed of decimal64_fast operator*
mborland Jun 27, 2024
2ef3197
Ignore coverage on debug statements
mborland Jun 27, 2024
4d81050
Ignore probabilistic continue statement
mborland Jun 27, 2024
4ed4b02
Probabilistic test path
mborland Jun 27, 2024
84d31e4
Merge pull request #683 from cppalliance/dec128_basics
mborland Jun 27, 2024
5719f40
Merge pull request #685 from cppalliance/test_coverage
mborland Jun 27, 2024
149f76d
Add new 32- bit addition impl that removes swaps and 2 branches
mborland Jun 27, 2024
c362f4e
Remove additional branch
mborland Jun 27, 2024
04e8afd
Add automatic detection of fast math
mborland Jun 27, 2024
7af51f9
Convert mixed addition to use the new addition implementation
mborland Jun 27, 2024
e3b9e02
Rename new function to match other add_impls
mborland Jun 27, 2024
453a08f
Shift decimal32_fast operator+ to new addition impl
mborland Jun 27, 2024
bfa5d61
Apply new addition impl to decimal32_fast
mborland Jun 28, 2024
d8f5dbf
Remove unnecessary use of structs
mborland Jun 28, 2024
2a2c8f9
Cast to correct addition type
mborland Jun 28, 2024
860c5e7
Merge pull request #689 from cppalliance/add
mborland Jul 1, 2024
bd7691a
Add new 64-bit addition impl
mborland Jul 1, 2024
e714c10
Use new implementation
mborland Jul 1, 2024
27bec57
Use new impl in decimal64_fast
mborland Jul 1, 2024
4404b70
Remove obsolete impl
mborland Jul 1, 2024
4f9b37c
Move rounding step location
mborland Jul 1, 2024
58d8d29
Add new 128-bit addition impl
mborland Jul 1, 2024
c97212c
Use new impl with decimal128
mborland Jul 1, 2024
ac932f1
Use new impl with decimal128_fast
mborland Jul 1, 2024
9e9858c
Improve int128::operator+
mborland Jul 1, 2024
ca44a5d
Add ADX detection
mborland Jul 1, 2024
0e59e24
Use adx instruction when available
mborland Jul 1, 2024
a7d7adb
Fix function signature
mborland Jul 1, 2024
c15f0a5
Fix sign conversion warnings
mborland Jul 1, 2024
9ca7ede
Fix _addcarry_u64 macro for MSVC
mborland Jul 1, 2024
73669da
Merge pull request #691 from cppalliance/add_64
mborland Jul 2, 2024
8f41872
Add new, reduced 32 bit subtraction impl
mborland Jul 1, 2024
e21835a
Use the new impl
mborland Jul 1, 2024
0b94018
Use new impl for mixed type arithmetic
mborland Jul 2, 2024
58cddc9
Use new impl in decimal32_fast
mborland Jul 2, 2024
14067a4
Refactor name and remove old implementation
mborland Jul 2, 2024
b202107
Merge pull request #693 from cppalliance/sub32
mborland Jul 2, 2024
22b425f
Add new 64 bit subtraction impl
mborland Jul 2, 2024
62400ad
Use new implementation in decimal64
mborland Jul 2, 2024
ee1ae81
Use new subtraction impl in decimal64_fast
mborland Jul 2, 2024
d131dea
Refactor and remove old implementation
mborland Jul 2, 2024
c0556bc
Add new 128-bit subtraction impl
mborland Jul 2, 2024
863da78
Use new implementation for decimal128
mborland Jul 2, 2024
76dafa5
Use new impl for decimal128_fast
mborland Jul 2, 2024
50393e8
Refactor name and remove old 128 bit implementation
mborland Jul 2, 2024
2c81047
Merge pull request #696 from cppalliance/sub64_128
mborland Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ local linux_pipeline(name, image, environment, packages = "", sources = [], arch
{
name: "everything",
image: image,
privileged: true,
environment: environment,
commands:
[
Expand Down
4 changes: 4 additions & 0 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@ python tools/boostdep/depinst/depinst.py -I example $LIBRARY
./bootstrap.sh
./b2 -d0 headers

if [[ $(uname) == "Linux" ]]; then
echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
fi

echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
./b2 -j3 libs/$LIBRARY/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${CXXFLAGS:+cxxflags=$CXXFLAGS} ${CXXSTDDIALECT:+cxxstd-dialect=$CXXSTDDIALECT} ${LINKFLAGS:+linkflags=$LINKFLAGS}
9 changes: 5 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ------------------------------------------------------------------------------
# Copyright Matt Borland 2023.
# Copyright Christopher Kormanyos 2023.
# Copyright Matt Borland 2023 - 2024.
# Copyright Christopher Kormanyos 2023 - 2024.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -66,7 +66,8 @@ jobs:
- name: upload-codecov
uses: codecov/codecov-action@v4
with:
files: ./test/cover/coverage.info
plugin: gcov
file: ${{ runner.workspace }}/decimal/test/cover/coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
functionalities: fix
verbose: false
50 changes: 33 additions & 17 deletions include/boost/decimal/charconv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ namespace detail {
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
constexpr auto from_chars_general_impl(const char* first, const char* last, TargetDecimalType& value, chars_format fmt) noexcept -> from_chars_result
{
using significand_type = std::conditional_t<std::is_same<TargetDecimalType, decimal128>::value, detail::uint128, std::uint64_t>;
using significand_type = std::conditional_t<std::is_same<TargetDecimalType, decimal128>::value ||
std::is_same<TargetDecimalType, decimal128_fast>::value, detail::uint128, std::uint64_t>;

if (first >= last)
{
Expand Down Expand Up @@ -714,6 +715,11 @@ BOOST_DECIMAL_CONSTEXPR auto to_chars_hex_impl(char* first, char* last, const Ta
return to_chars_integer_impl<std::uint32_t, std::uint32_t>(first, last, static_cast<std::uint32_t>(abs_exp), 10);
}

#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4702) // Unreachable code
#endif

template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE TargetDecimalType>
BOOST_DECIMAL_CONSTEXPR auto to_chars_impl(char* first, char* last, TargetDecimalType value, chars_format fmt = chars_format::general, int precision = -1) noexcept -> to_chars_result
{
Expand All @@ -730,28 +736,26 @@ BOOST_DECIMAL_CONSTEXPR auto to_chars_impl(char* first, char* last, TargetDecima

constexpr auto min_fractional_value = TargetDecimalType{1, -4};

if (fmt == chars_format::hex)
{
return to_chars_hex_impl(first, last, value, precision);
}

// Unspecified precision so we always go with the shortest representation
if (precision == -1)
{
if (fmt == chars_format::general || fmt == chars_format::fixed)
switch (fmt)
{
if (abs_value >= 1 && abs_value < max_fractional_value)
{
case chars_format::general:
if (abs_value >= 1 && abs_value < max_fractional_value)
{
return to_chars_fixed_impl(first, last, value, fmt, precision);
}
else
{
return to_chars_scientific_impl(first, last, value, fmt, precision);
}
case chars_format::fixed:
return to_chars_fixed_impl(first, last, value, fmt, precision);
}
else
{
case chars_format::scientific:
return to_chars_scientific_impl(first, last, value, fmt, precision);
}
}
else
{
return to_chars_scientific_impl(first, last, value, fmt, precision);
case chars_format::hex:
return to_chars_hex_impl(first, last, value, precision); // LCOV_EXCL_LINE unreachable
}
}
else
Expand All @@ -766,13 +770,25 @@ BOOST_DECIMAL_CONSTEXPR auto to_chars_impl(char* first, char* last, TargetDecima
{
return to_chars_fixed_impl(first, last, value, fmt, precision);
}
else if (fmt == chars_format::hex)
{
return to_chars_hex_impl(first, last, value, precision);
}
else
{
return to_chars_scientific_impl(first, last, value, fmt, precision);
}
}

// LCOV_EXCL_START
return to_chars_scientific_impl(first, last, value, fmt, precision);
// LCOV_EXCL_STOP
}

#ifdef _MSC_VER
# pragma warning(pop)
#endif

} //namespace detail

BOOST_DECIMAL_EXPORT BOOST_DECIMAL_CONSTEXPR auto to_chars(char* first, char* last, decimal32 value) noexcept -> to_chars_result
Expand Down
3 changes: 2 additions & 1 deletion include/boost/decimal/cmath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <boost/decimal/detail/cmath/ceil.hpp>
#include <boost/decimal/detail/cmath/cos.hpp>
#include <boost/decimal/detail/cmath/cosh.hpp>
#include <boost/decimal/detail/cmath/ellint_1.hpp>
#include <boost/decimal/detail/cmath/ellint_2.hpp>
#include <boost/decimal/detail/cmath/exp.hpp>
#include <boost/decimal/detail/cmath/exp2.hpp>
#include <boost/decimal/detail/cmath/expm1.hpp>
Expand Down Expand Up @@ -69,7 +71,6 @@
#include <boost/decimal/detail/cmath/assoc_laguerre.hpp>
#include <boost/decimal/detail/cmath/legendre.hpp>
#include <boost/decimal/detail/cmath/assoc_legendre.hpp>
#include <boost/decimal/detail/cmath/ellint_1.hpp>
#include <boost/decimal/detail/cmath/trunc_to.hpp>
#include <boost/decimal/detail/cmath/beta.hpp>
#include <boost/decimal/numbers.hpp>
Expand Down
10 changes: 5 additions & 5 deletions include/boost/decimal/cstdlib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ inline auto strtod_impl(const char* str, char** endptr) noexcept -> TargetDecima
if (str == nullptr)
{
errno = EINVAL;
return std::numeric_limits<TargetDecimalType>::signaling_NaN();
return std::numeric_limits<TargetDecimalType>::quiet_NaN();
}

const auto str_length {std::strlen(str)};
Expand All @@ -106,7 +106,7 @@ inline auto strtod_impl(const char* str, char** endptr) noexcept -> TargetDecima
// Hard to get coverage on memory exhaustion
// LCOV_EXCL_START
errno = ENOMEM;
return std::numeric_limits<TargetDecimalType>::signaling_NaN();
return std::numeric_limits<TargetDecimalType>::quiet_NaN();
// LCOV_EXCL_STOP
}

Expand All @@ -126,7 +126,7 @@ inline auto wcstod_calculation(const wchar_t* str, wchar_t** endptr, char* buffe
if (BOOST_DECIMAL_UNLIKELY(val > 255))
{
// Character can not be converted
return std::numeric_limits<TargetDecimalType>::signaling_NaN();
return std::numeric_limits<TargetDecimalType>::quiet_NaN();
}

buffer[i] = static_cast<char>(val);
Expand All @@ -150,7 +150,7 @@ inline auto wcstod_impl(const wchar_t* str, wchar_t** endptr) noexcept -> Target
if (str == nullptr)
{
errno = EINVAL;
return std::numeric_limits<TargetDecimalType>::signaling_NaN();
return std::numeric_limits<TargetDecimalType>::quiet_NaN();
}

const auto str_length {detail::strlen(str)};
Expand All @@ -169,7 +169,7 @@ inline auto wcstod_impl(const wchar_t* str, wchar_t** endptr) noexcept -> Target
// Hard to get coverage on memory exhaustion
// LCOV_EXCL_START
errno = ENOMEM;
return std::numeric_limits<TargetDecimalType>::signaling_NaN();
return std::numeric_limits<TargetDecimalType>::quiet_NaN();
// LCOV_EXCL_STOP
}

Expand Down
Loading
Loading