IRainman
27f02654fe
style cleanup.
2025-04-08 04:06:30 +03:00
IRainman
5c610807de
improvements of memory layout of parsed_number_string_t.
...
fix for FORTRAN parsing (needs to be merge to main)
improvement in the debug build.
code cleanup.
2025-04-08 04:04:26 +03:00
IRainman
b121f53316
reduce register pressure.
2025-04-08 03:55:12 +03:00
IRainman
a133b72fa8
FASTFLOAT_ASSUME
2025-04-08 03:24:11 +03:00
IRainman
b261492ae7
reduce register pressure.
2025-04-08 01:22:14 +03:00
IRainman
4f0615b4b4
Reduce register pressure and cleanup interface for standard.
2025-04-07 23:21:29 +03:00
IRainman
1651c2b0f8
Readded FASTFLOAT_CONSTEVAL, but not used currently. Cleanup for FASTFLOAT_ASSUME.
2025-04-07 23:10:38 +03:00
IRainman
ee620a029d
reduce registers pressure.
2025-03-28 20:29:25 +03:00
IRainman
6aea2fb2e5
initialization cleanup.
2025-03-28 20:27:39 +03:00
IRainman
afb54a595e
Disable FASTFLOAT_ASSUME by default.
2025-03-28 20:15:19 +03:00
IRainman
91e6c4d440
.
2025-03-28 19:39:10 +03:00
IRainman
ed871096ad
Remove FASTFLOAT_CONSTEVAL20 that I was added before and cleanup diff.
2025-03-28 18:57:37 +03:00
IRainman
fc9f61efc9
Cleanup initialization of the adjusted_mantissa.
2025-03-28 18:55:57 +03:00
IRainman
8ebc89e1b5
Reduce registers pressure.
2025-03-28 18:31:01 +03:00
IRainman
1e3a135b8d
reduce register pressure.
2025-03-24 11:45:33 +03:00
IRainman
c598a994e6
fix a warning.
2025-03-24 11:15:24 +03:00
IRainman
0188112c8f
compilation fix in some old compilers.
2025-03-13 00:37:46 +03:00
IRainman
929e98182e
lint
2025-03-12 21:13:20 +03:00
IRainman
2db26df2b8
Remove consexpr/consteval from code that probably assumed to run in the runtime and not be optimized (strange crutch actually).
2025-03-12 20:35:28 +03:00
IRainman
27c0cd581c
lint
2025-03-12 20:23:05 +03:00
IRainman
f3c60527d5
more constexpr.
2025-03-12 20:15:29 +03:00
IRainman
3dd3712782
lint
2025-03-12 20:11:11 +03:00
IRainman
07ab87ca2b
compilation fix in some cases.
2025-03-12 20:05:34 +03:00
IRainman
b869816c39
Merge branch 'main' of https://github.com/IRainman/fast_float into fastfloat-main
2025-03-12 19:04:01 +03:00
IRainman
e84f289337
FASTFLOAT_IF_CONSTEXPR17
...
fix compilation when FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't enabled.
2025-03-12 18:45:48 +03:00
IRainman
1899647146
GCC compilation fix.
2025-03-12 17:56:01 +03:00
IRainman
3dd9a98926
more const
2025-03-12 17:44:08 +03:00
HedgehogInTheCPP
cfd0963705
Merge branch 'main' into main
2025-03-12 17:16:03 +03:00
IRainman
681346fde1
Merge branch 'main' of https://github.com/fastfloat/fast_float into fastfloat-main
2025-03-12 17:00:35 +03:00
Daniel Lemire
50a80a73ab
v8.0.2
2025-03-11 09:51:53 -04:00
Daniel Lemire
1bf7010153
v8.0.1
2025-03-10 09:04:05 -04:00
Daniel Lemire
c6732cd28b
lint
2025-03-10 09:02:38 -04:00
IRainman
6c499fda5c
FASTFLOAT_ASSUME review.
2025-03-10 05:34:45 +03:00
Daniel Lemire
b29208f93d
adding FASTFLOAT_IF_CONSTEXPR17
2025-03-09 17:10:55 -04:00
IRainman
63eb578d52
Add FASTFLOAT_HAS_BYTESWAP check.
...
Improve FASTFLOAT_CONSTEVAL20 usage for older standards.
2025-03-09 22:55:04 +03:00
Daniel Lemire
6f0049a2e7
lint
2025-03-09 15:14:52 -04:00
Daniel Lemire
95dedd0aed
turning json option into macro parameter
2025-03-09 15:13:43 -04:00
IRainman
354f4c3eac
Compilation fix.
2025-03-09 21:09:51 +03:00
IRainman
c2daa8a614
Added FASTFLOAT_ASSUME for support attribute [[assume]] is declared in P1774
2025-03-09 03:41:27 +03:00
IRainman
f496321570
Completely remove deprecated macroses FASTFLOAT_ALLOWS_LEADING_PLUS and FASTFLOAT_SKIP_WHITE_SPACE, please use options.
...
Compilation fix when FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN isn't defined.
2025-03-09 02:37:46 +03:00
IRainman
ae29a0dbe5
PVS-Studio founds some errors, I fixed it.
2025-03-07 20:39:20 +03:00
IRainman
388426e35a
fix type conversion warning.
2025-03-07 15:06:44 +03:00
IRainman
aba93f306f
Additional compile time cleanup. When FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN is enabled we assume that we are in parser code with external loop that checks bounds.
...
Function cpp20_and_in_constexpr() now is really compile time evaluated. TODO fix warnings.
2025-03-07 14:51:20 +03:00
IRainman
bc3f331938
# cleanup.
2025-03-06 23:02:50 +03:00
IRainman
7a38e1bc75
fix for 32 bit build. completely done. All other parser mode also work fine.
2025-03-06 22:47:47 +03:00
IRainman
9ebac23081
Added a config option FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN for faster and more compact code parsing numbers with input support only positive C/C++ style numbers without nan or inf. That case is very useful in mathematical applications, game development, CSS parsing, embedded code, etc...
...
Additional improve in constant initialization.
2025-03-06 22:25:05 +03:00
IRainman
28795646ab
more const
2025-03-06 19:43:47 +03:00
IRainman
63f6abebdf
* Added an option disallow_leading_sign and stronger constexpr / consteval, also significantly reduce register pressure by reducing copy of constant data.
2025-03-06 18:29:16 +03:00
Joao Paulo Magalhaes
3e9dc96eb4
Fix -Wundef warnings seen in gcc 4.8 and 4.9
2025-02-13 08:45:11 +00:00
Joao Paulo Magalhaes
9cfa5ff4a0
fix warnings from -Wundef
2025-02-12 23:51:44 +00:00
Daniel Lemire
77cc847c84
pushing version change
2025-02-08 11:49:58 -05:00
Daniel Lemire
7a5ee5af60
Merge pull request #296 from dalle/dalle/float16
...
16-bit float support
2025-02-06 19:41:37 -05:00
Daniel Lemire
1d50f57dd9
better wording.
2025-02-06 00:16:28 -05:00
Johan Råde
d4d5748ec8
Silenced Visual Studio compiler warning
...
This code caused a C4127 "conditional expression is constant" compiler warning
when compiled with Visual Studio at warning level 4 with T a signed integer type.
2025-01-16 16:12:34 +01:00
Anders Dalvander
ce274f7051
include and order types largerst to smallest
2024-12-04 10:17:05 +01:00
Anders Dalvander
7226c00490
cleanup
2024-12-04 09:35:32 +01:00
Anders Dalvander
2a6c2604b5
check for IEEE 754 compliance
2024-12-04 09:34:34 +01:00
Anders Dalvander
62f526dfd3
fix -Werror=conversion
2024-12-03 23:52:57 +01:00
Anders Dalvander
da819feb74
back to std::bit_cast
2024-12-03 23:23:35 +01:00
Anders Dalvander
8cee025082
add powers_of_ten/max_mantissa for float16_t/bfloat16_t
2024-12-03 23:23:34 +01:00
Daniel Lemire
6f8fd6728d
make it build
2024-12-03 23:23:34 +01:00
Daniel Lemire
bfcff49c83
16-bit float support
2024-12-03 23:23:34 +01:00
Anders Dalvander
3775a81ced
formatted code
2024-12-01 16:39:28 +01:00
Anders Dalvander
0a1bf11560
harmonize ifdef checks
2024-12-01 16:36:45 +01:00
Anders Dalvander
3146e686d0
introduce equiv_uint_t
2024-12-01 16:36:17 +01:00
Anders Dalvander
d3f7113d6e
add char8_t support
2024-11-23 10:21:48 +01:00
Anders Dalvander
1a15c66fb9
harmonize files to use "east const"
...
manually checked modified files for errors, but not committing .clang-format due to the following warning:
>>> Setting `QualifierAlignment` to something other than `Leave`, COULD lead to incorrect code formatting due to incorrect decisions made due to clang-formats lack of complete semantic information. As such extra care should be taken to review code changes made by the use of this option.
2024-11-23 09:46:18 +01:00
Anders Dalvander
7f476cd259
fix clang unused-function warning
2024-11-23 09:04:46 +01:00
Daniel Lemire
cf771eaa83
Merge pull request #283 from dalle/issue282-better-error-messages
...
Better compile time error messages for unsupported types
2024-11-22 13:09:49 -05:00
Anders Dalvander
35d0c8c179
add version macros
2024-11-22 16:44:56 +01:00
Anders Dalvander
74829bb77d
better compile time error messages for unsupported types
2024-11-22 16:25:31 +01:00
Anders Dalvander
50ee38af65
fix for fastfloat_strncasecmp for wchar_t and larger char types
2024-11-21 00:09:05 +01:00
Anders Dalvander
7ff885d45c
fix for is_space for wchar_t and larger char types
2024-11-21 00:09:00 +01:00
Anders Dalvander
48252a6483
check feature macros in once place
2024-11-21 00:08:19 +01:00
Anders Dalvander
0bbba960f4
move from feature macros to format flags
2024-11-21 00:06:08 +01:00
Anders Dalvander
b3526da935
uint64_t as enum base for chars_format
2024-11-20 23:01:56 +01:00
Anders Dalvander
b8b5da75a5
enum class chars_format
2024-11-20 09:33:16 +01:00
Anders Dalvander
b635dec11a
clang format
2024-11-19 10:32:37 +01:00
Anders Dalvander
23787fc71a
fix #276 : parse_infnan handles FASTFLOAT_ALLOWS_LEADING_PLUS correctly
2024-11-17 16:23:01 +01:00
Anders Dalvander
72b2a7382a
const ness
2024-11-17 16:22:05 +01:00
Anders Dalvander
269867fa43
spelling
2024-11-17 16:17:35 +01:00
Evgeny Karpov
c9f8339668
Fix the formatting and remove the previous condition
2024-09-02 18:13:01 +02:00
Evgeny Karpov
2609d5fd4b
The patch resolves GCC compilation issues for the C++ language targeting
...
aarch64-w64-mingw32.
More information could be found here:
https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662020.html
2024-09-02 17:24:33 +02:00
Yedidya Feldblum
159589d356
remove out-of-line defns of constexpr static data members under c++17
...
Address warnings of this form under c++17 when building with `-Werror -Wdeprecated`:
```
fast_float/float_common.h:446:58: error: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Werror,-Wdeprecated]
constexpr double binary_format_lookup_tables<double, U>::powers_of_ten[];
^
```
2024-08-30 10:30:40 -05:00
Daniel Lemire
5ad6aae0b1
lint
2024-08-14 09:57:47 -04:00
Leszek Swirski
74e3c29215
Include intrin.h for __umulh
...
Arm64 uses __umulh, so add the same condition for including the intrin.h
header.
2024-08-14 15:10:14 +02:00
Daniel Lemire
d57ca3da1f
Merge pull request #259 from fastfloat/issue258
...
issue 258
2024-08-03 16:38:10 -04:00
Daniel Lemire
207d66162a
issue 258
2024-08-03 10:02:42 -04:00
Leszek Swirski
b6ce2c4de6
Record parse failure reason and location
...
In parse_number_string, if there is a parse error, report the specific
error as one of the values in a new parse_error enum, and update
lastmatch to match the error location. This allows users of the library
to print more helpful error messages for invalid inputs.
2024-07-23 18:11:10 +02:00
Leszek Swirski
e6777f2eef
Allow JSON empty exponent as trailing junk
...
Revert #251 , and instead allow an invalid trailing empty exponent to be
treated as junk data in JSON parsing. Expand the test suite to test this
case, including testing the trailing junk.
2024-07-23 14:56:42 +02:00
Daniel Lemire
ef9a60d516
update CI to ubuntu 24 + safe a shift value to a variable (for elegance)
2024-07-22 09:36:14 -04:00
Leszek Swirski
b57207c811
Disallow empty exponent in JSON parsing
...
The JSON spec requires at least one digit in the exponential part, if
specified.
2024-07-22 12:34:58 +02:00
Daniel Lemire
92c79d078b
Merge pull request #249 from zejal/main
...
from_chars_advanced overload function taking parsed_number_string_t
2024-07-16 10:17:08 -04:00
Daniel Lemire
c8b3ca0d12
Merge pull request #167 from deadalnix/smallest_power_of_ten
...
Change smallest_power_of_ten to -64 for floats.
2024-06-27 19:03:59 -04:00
zejal
85911abb59
added couple of comments
2024-05-13 19:55:46 +02:00
zejal
1f9b1a6706
from_chars_advanced overload function taking parsed_number_string_t
2024-05-13 14:24:48 +02:00
Daniel Lemire
56a0092895
removing unused function
2024-03-20 14:24:16 -04:00
Matthew Wozniczka
9ab4ac837b
Add a missing check that __uint128_t exists before using it.
...
I noticed a compilation error when building a 64-bit binary with this library while using xlclang on AIX, and this change seems to fix it.
2024-03-16 12:18:20 -07:00
Marcin Wojdyr
55a5b3c8e1
check C++ standard version before including <stdfloat>
...
fixes #238
2024-02-03 15:05:30 +01:00
Daniel Lemire
12ece3c84f
removing leftover print
2024-01-28 15:20:41 -05:00