464 Commits

Author SHA1 Message Date
Daniel Lemire
a662df817f If we detect that the compiler supports FASTFLOAT_IS_CONSTEXPR, then let us run the tests automatically. 2023-03-26 20:43:33 -04:00
Daniel Lemire
ab6c987ebc
Merge pull request #185 from fastfloat/dlemire/adding_more_cxx20_in_ci
Adding more CXX20 testing in CI.
2023-03-26 20:32:23 -04:00
Daniel Lemire
c8bba6ab29 Fix CI issue 2023-03-26 07:22:07 -04:00
Daniel Lemire
5a6b371739 Let us turn FASTFLOAT_CONSTEXPR_TESTS ON 2023-03-25 17:34:38 -04:00
Daniel Lemire
c52769174b Merge branch 'main' into dlemire/adding_more_cxx20_in_ci 2023-03-25 17:31:36 -04:00
Daniel Lemire
b50a729d93
Merge pull request #182 from leni536/constexpr-from_chars
Constexpr from_chars
2023-03-25 17:30:55 -04:00
Daniel Lemire
c09c855ea6
Merge pull request #186 from leni536/negative_zero_clang
Fix parsing -0 on clang in non-nearest rounding modes.
2023-03-25 16:03:13 -04:00
Lenard Szolnoki
5b8290433c Fix clang workaround for parsing -0 on non-nearest rounding mode 2023-03-25 19:38:44 +00:00
Lenard Szolnoki
360977f968 Add negative zero parsing test for all rounding modes.
This fails on clang.
2023-03-25 19:28:05 +00:00
Lenard Szolnoki
a1a7c4e3e0 Extend verify_options with constexpr test 2023-03-25 18:28:00 +00:00
Daniel Lemire
845d6575dc Adding more CXX20 testing in CI. 2023-03-24 14:24:38 -04:00
Lenard Szolnoki
e464bd7785 Replace memmove with copy_backward 2023-03-24 17:18:58 +00:00
Lenard Szolnoki
6bd1e776b2 Constexpr isnan 2023-03-24 16:35:25 +00:00
Lenard Szolnoki
24b2fdaad0 Separate verify and verify_runtime macros, extend constexpr checks
`verify` runs both runtime and constexpr checks if the constexpr checks
are enabled in cmake.

`verify_runtime` only runs the runtime checks.
2023-03-24 16:18:00 +00:00
Daniel Lemire
8cb0590c02
Merge pull request #184 from silvergasp/main
Adds a simple fuzz test
2023-03-12 20:50:58 -04:00
Nathaniel Brough
e702fba365 Adds simple fuzz test 2023-03-12 11:51:50 -07:00
Lenard Szolnoki
264414c0b0 Remove default capture with init-capture in hope of fixing MSVC build. 2023-03-12 15:17:14 +00:00
Lenard Szolnoki
612a7bf5eb Enable constexpr tests for VS17 c++20 build. 2023-03-12 11:40:20 +00:00
Lenard Szolnoki
d34d0d7405 Fix amalgamate.ph and add header for constexpr macros 2023-03-12 10:50:25 +00:00
Daniel Lemire
eb8c001201
Merge pull request #183 from redis-performance/fix.parse_infnan.plus.inf
Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan
v3.10.1
2023-03-06 20:52:43 -05:00
filipecosta90
c8886eb31d Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan 2023-03-07 00:31:14 +00:00
Lenard Szolnoki
ffc3fd7cc7 Fix amalgamate.py script
This unfortunately puts fast_float.h as the second header,
possiby making the amalgamated header less readable.
2023-03-04 23:30:56 +00:00
Lenard Szolnoki
e05858a0f8 Work around clang bug.
https://godbolt.org/z/zedh7rrhc

This is similar to https://github.com/llvm/llvm-project/issues/47746,
except I needed to use a different workaround.
2023-03-04 23:02:15 +00:00
Lenard Szolnoki
6732e397d8 Add constexpr testing
When enabled, modify `verify` macro to also verify at compile time,
when the arguments are constant expressions.
2023-03-04 22:36:58 +00:00
Daniel Lemire
808cd24919
Merge pull request #181 from leni536/patch-1
Add my name to CONTRIBUTORS
2023-03-04 17:32:38 -05:00
Lenard Szolnoki
58798ee81f Fix failing test builds with -Werror=maybe-uninitialized on gcc
Apparently the added constexpr makes gcc's control flow analysis to go deeper.

If from_chars returns with error then the out parameter remains
uninitialized. As it's undefined behavior to use its value, it's better
to just skip the rest of the loop in this case.
2023-03-04 20:53:49 +00:00
Lenard Szolnoki
e4d4e43b21 Constexpr from_chars 2023-03-04 20:53:43 +00:00
Lenard Szolnoki
82ee3b1b5f Constexpr parse_number_string 2023-03-04 17:18:25 +00:00
Lénárd Szolnoki
88c3b362f1
Add my name to CONTRIBUTORS 2023-03-04 09:25:12 +00:00
Daniel Lemire
c487a69c1b
Merge pull request #180 from leni536/constexpr-big_int
Constexpr big_int
2023-03-03 19:26:29 -05:00
Lenard Szolnoki
5243dd97fe Constexpr bigint 2023-03-03 23:13:52 +00:00
Lenard Szolnoki
52618851fd Make all float_common.h functions constexpr in C++20 2023-03-03 22:43:52 +00:00
Daniel Lemire
a3e00eed59
Merge pull request #179 from leni536/simplify-to_float
Simplify to_float
2023-03-02 20:16:23 -05:00
Lenard Szolnoki
6d2fb68f5c Simplify to_float
* Use right-sized uint type for bit fiddling
** This removes the need to special casing on endianness
* Replace ternary with just shifting the sign at the right place
** This seems to improve codegen (less instructions, no cmov)
2023-03-01 23:39:01 +00:00
Daniel Lemire
b1d27734c5
Merge pull request #173 from fastfloat/nofallbacknecessary
We do not need a fallback.
2023-02-28 17:19:57 -05:00
Daniel Lemire
a64cfc960b
Merge pull request #178 from lemire/dlemire/adding_bloat_analysis
This adds bloat analysis to the tests.
2023-02-28 17:19:25 -05:00
Daniel Lemire
06333da7fe
Merge branch 'main' into dlemire/adding_bloat_analysis 2023-02-28 17:10:05 -05:00
Daniel Lemire
52fed52d94
Merge pull request #177 from leni536/easy-constexpr
Low-risk C++11 and C++14 constexpr functions
2023-02-28 17:08:37 -05:00
Daniel Lemire
7f1c4a2f7f This adds bloat analysis to the tests. 2023-02-28 16:42:48 -05:00
Daniel Lemire
3f3fc935e0
adding reference to upcoming paper 2023-02-28 10:17:08 -05:00
Lenard Szolnoki
e320512755 Fix power_of_five_128 to be usable in constexpr in MSVC, clang 2023-02-25 18:34:22 +00:00
Lenard Szolnoki
0e4b873d81 Fix space_lut so it's accepted by MSVC and clang 2023-02-25 18:27:10 +00:00
Lenard Szolnoki
a6991ea44f Add comment to the FASTFLOAT_CONSTEXPR14 macro definition 2023-02-25 11:11:09 +00:00
Lenard Szolnoki
be6084863c Low-risk C++14 constexpr functions 2023-02-25 10:50:45 +00:00
Daniel Lemire
3fd4c1b507 Bumping the version. v3.10.0 2023-02-06 17:41:15 -05:00
Daniel Lemire
f4efe3ccb0
Merge pull request #175 from fastfloat/dlemire/broader_alpine
Trying to extend alpine CI to more systems and fixing legacy issue (x86)
2023-02-06 17:39:27 -05:00
Daniel Lemire
252a1c9dce Minor fix. 2023-02-06 17:22:11 -05:00
Daniel Lemire
764a064c12 Adding back x86 2023-02-06 14:48:41 -05:00
Daniel Lemire
be2e6bb693 Typo. 2023-02-06 14:42:29 -05:00
Daniel Lemire
18349287f4 Trying to extend alpine. 2023-02-06 14:39:21 -05:00