893 Commits

Author SHA1 Message Date
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
Daniel Lemire
39e04ea766 We do not need a fallback. 2023-01-27 20:59:56 -05:00
Daniel Lemire
69e0ea6f8a
Merge pull request #172 from fastfloat/dlemire/adding_390
Adding big-endian runner
2023-01-27 11:32:33 -05:00
Daniel Lemire
7f86e5ad55 Fixing branch name 2023-01-26 23:09:12 -05:00
Daniel Lemire
57536631af Adding token 2023-01-26 23:01:41 -05:00
Daniel Lemire
033536dbba Adding big-endian runner 2023-01-26 22:48:05 -05:00
Daniel Lemire
7a6fe5ee79 Bumping the version. v3.9.0 2023-01-19 20:54:23 -05:00
Daniel Lemire
e84f7e7850
Merge pull request #170 from fastfloat/dlemire/rcpp
Support rccpfastfloat via macros
2023-01-19 20:50:46 -05:00
Daniel Lemire
3e2da540ef Support rccpfastfloat. 2023-01-19 20:28:10 -05:00
Daniel Lemire
34d443d6fc Bumping version. v3.8.2 2023-01-18 18:27:19 -05:00
Daniel Lemire
e7d25fb058
Merge pull request #169 from barracuda156/main
float_common.h: add support for ppc32
2023-01-18 18:26:07 -05:00
Sergey Fedorov
ff7fba01d0
float_common.h: add support for ppc32 2023-01-18 14:15:14 +08:00
Daniel Lemire
1ea4f27b2a
Merge pull request #166 from fastfloat/dlemire/verify_normal_subnormal_limit
Adding test.
2023-01-10 11:20:27 -05:00
Daniel Lemire
09f89895f1 Adding test. 2023-01-10 10:32:59 -05:00
Daniel Lemire
177ef91fc9
Merge pull request #165 from fastfloat/dlemire/guard_endian
Guard endian include
2023-01-09 13:42:11 -05:00
Daniel Lemire
c8aac4a63d Guard endian 2023-01-07 13:28:12 -05:00
Daniel Lemire
e92c63295c
Update CMakeLists.txt 2023-01-04 12:54:20 -05:00
jpmag
02a61971f8
Merge pull request #162 from biojppm/fix/testexes
Fix compile warning: implicit type conversion
2022-12-27 12:20:06 +01:00
Joao Paulo Magalhaes
7f7838b36a Fix compile warning: implicit double->float type conversion
With Intel 2021.1:
```
/home/runner/work/c4core/c4core/src/c4/ext/fast_float_all.h:319:49: error: implicit conversion between floating point types of different sizes [-Werror,-Wimplicit-float-size-conversion]
constexpr static float powers_of_ten_float[] = {1e0, 1e1, 1e2, 1e3,
1e4, 1e5,
```
2022-12-27 11:09:17 +00:00
Joao Paulo Magalhaes
cb4779df3d Fix workflow for Ubuntu 20.04 2022-12-27 11:09:17 +00:00
Joao Paulo Magalhaes
0ba57912ff Enable tests with cross compilation 2022-12-27 11:09:17 +00:00
jpmag
98d46aee9c
Merge pull request #163 from biojppm/suppress_float_equal_warning
Suppress compile warning from float comparison
2022-12-27 12:06:51 +01:00