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

C++23 Floats #978

Merged
merged 53 commits into from
Jun 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
7a6efab
First draft of promotion
mborland Apr 24, 2023
5dcf5a9
Test beta dist for F64, F32, and F16
mborland Apr 24, 2023
4c753c2
Reverse 128bits and prefer F64 over long double when it's 64bits
mborland Apr 25, 2023
2f0b0ed
Add more testing
mborland Apr 25, 2023
bc79263
Add compile tests for F32 and F64
mborland May 2, 2023
2b1d5b6
Cast assignment of promoted type
mborland May 2, 2023
be37704
Explicit casting of promoted types
mborland May 2, 2023
5d044d5
Remove cast for output iterator
mborland May 9, 2023
6a3a89b
Add testing to quadrature
mborland May 11, 2023
3c2a04e
Add gcc-13 to drone config
mborland May 11, 2023
ac4605b
Fix Minw-64 C++23 compile failures.
jzmaddock May 13, 2023
b3f361c
Fix the promote_args<float32_t, float32_t> case.
jzmaddock May 14, 2023
58264c0
Add test case for promote_args.
jzmaddock May 14, 2023
c5b4d28
Suppress lots of warnings for std::float32_t.
jzmaddock May 15, 2023
ac8765b
Update drone to use Ubuntu 23.04 for g++13
mborland May 15, 2023
fa8a83f
Enable testing of new floats
mborland May 15, 2023
d217813
Fix stack overflow on test_finite_singular_boundary with _Float64
mborland May 16, 2023
8433636
Fix remaining warnings from float32.cpp.
jzmaddock May 16, 2023
6104363
Add float128 testing
mborland May 16, 2023
5045047
Use charconv instead of streaming operator for std::float128_t
mborland May 16, 2023
0c1920b
Move macro definitions to config
mborland May 16, 2023
a0360d8
Use charconv in convert_from_string for arithmetic types
mborland May 16, 2023
edf6597
inline template specialization
mborland May 16, 2023
55eaf05
Add additional conversion function for C++23 types
mborland May 16, 2023
00facdc
Fix cardinal cubic b spline for std::float32_t
mborland May 17, 2023
f86ea8e
Begin adding interpolator tests
mborland May 17, 2023
41be4fb
Improve to/from_chars configuration.
jzmaddock May 21, 2023
51d7011
Fix formatting and missing header
mborland May 22, 2023
c4c8c69
Add wavelet transform test with additional casts
mborland May 22, 2023
aef5713
Add rsqrt test and update type traits for control path
mborland May 22, 2023
ca31dcf
Add AGM test
mborland May 22, 2023
faaf475
Fix stack overflow in cohen acceleration from GCC bug
mborland May 22, 2023
ebcc430
Add casting to whittaker shannon for conversion rank errors
mborland May 22, 2023
d1bd7b6
Add casting and tests
mborland May 22, 2023
823fcd4
Add test and cast to finite differences
mborland May 30, 2023
c249bfe
Fix -Wreturn-type
mborland May 30, 2023
6d37555
Collected autodiff fixes
mborland May 30, 2023
ae56ab2
Fix conversion errors in digamma
mborland May 31, 2023
7a66a98
Fix for autodiff 3
mborland May 31, 2023
b66264f
Collected special functions warning fixes
mborland May 31, 2023
a7f98db
Add casts to all two argument cmath functions to work around GCC bug
mborland May 31, 2023
ff1a265
Add to test_constants
mborland May 31, 2023
a6bc6c7
Add <stdfloat> constructor to real_concept
mborland Jun 5, 2023
bc9d4b1
Fix failures and warnings in test_autodiff_6
mborland Jun 5, 2023
677f3b6
Collected fixes for test_autodiff_8
mborland Jun 5, 2023
7a0e8e0
More casting of pow
mborland Jun 16, 2023
37df734
Add integer exponent function to chebyshev detail
mborland Jun 16, 2023
0117f4a
Fix multiprecision concept failure
mborland Jun 16, 2023
ef423e8
Restore drone config
mborland Jun 16, 2023
e62a284
Fix multiprecision failures
mborland Jun 19, 2023
b57749d
Fix casting errors
mborland Jun 20, 2023
0a014fd
Fix for expression template use in chebyshev.hpp.
jzmaddock Jun 21, 2023
851b357
Fix pessimization on unaffected platforms
mborland Jun 27, 2023
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
Prev Previous commit
Next Next commit
Add compile tests for F32 and F64
mborland committed May 2, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
mborland Matt Borland
commit bc79263bd0481e0cd96f0c91d0febf5804327def
5 changes: 5 additions & 0 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
@@ -902,6 +902,11 @@ test-suite distribution_tests :
[ run scipy_issue_18302.cpp ../../test/build//boost_unit_test_framework ]
;

test-suite new_floats :
[ compile compile_test/float32.cpp ]
[ compile compile_test/float64.cpp ]
;

test-suite mp :

[ run test_nc_t_quad.cpp pch ../../test/build//boost_unit_test_framework : : : release [ check-target-builds ../config//has_float128 "GCC libquadmath and __float128 support" : <linkflags>-lquadmath ] ]
32 changes: 32 additions & 0 deletions test/compile_test/float32.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright Matt Borland 2023.
// Use, modification and distribution are subject to 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)

#if __has_include(<stdfloat>)
# include <stdfloat>
#endif

#ifdef __STDCPP_FLOAT32_T__

#define TEST_COMPLEX

#include "instantiate.hpp"

int main(int argc, char* [])
{
if(argc > 10000)
{
instantiate(0.0F32);
instantiate_mixed(0.0F32);
}
}

#else

int main(int, char*[])
{
return 0;
}

#endif
32 changes: 32 additions & 0 deletions test/compile_test/float64.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright Matt Borland 2023.
// Use, modification and distribution are subject to 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)

#if __has_include(<stdfloat>)
# include <stdfloat>
#endif

#ifdef __STDCPP_FLOAT64_T__

#define TEST_COMPLEX

#include "instantiate.hpp"

int main(int argc, char* [])
{
if(argc > 10000)
{
instantiate(0.0F64);
instantiate_mixed(0.0F64);
}
}

#else

int main(int, char*[])
{
return 0;
}

#endif
4 changes: 3 additions & 1 deletion test/compile_test/instantiate.hpp
Original file line number Diff line number Diff line change
@@ -181,7 +181,9 @@ void instantiate(RealType)
int i = 1;
// Deal with unused variable warnings:
(void)i;
RealType v1(0.5), v2(0.5), v3(0.5);
auto v1(static_cast<RealType>(0.5));
auto v2(static_cast<RealType>(0.5));
auto v3(static_cast<RealType>(0.5));
boost::detail::dummy_constructor dc;
boost::output_iterator_archetype<RealType> oi(dc);
#ifdef TEST_GROUP_4