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
Daniel Lemire
a0ea962bf5
more fixes
2024-01-28 15:18:40 -05:00
Daniel Lemire
eb584f748e
explicit cast
2024-01-28 13:29:55 -05:00
Daniel Lemire
9da74ca5fb
minor fixes
2024-01-28 12:49:00 -05:00
Daniel Lemire
fade2357ba
fix missing typename
2024-01-28 11:46:27 -05:00
Daniel Lemire
c7e45fea9f
Merge pull request #229 from MTahaK/main
...
Support for float32_t and float64_t
2024-01-28 11:43:54 -05:00
Daniel Lemire
1d97749791
Verify and fix issue 235
2024-01-28 10:47:21 -05:00
Daniel Lemire
620376ad39
Merge branch 'main' into main
2024-01-28 10:09:56 -05:00
Darrell Wright
b43f808190
Update float_common.h
...
The construct !! is a no-op for a bool, op< for uint64_t's. Removed it and made it an explicit cast to match the operations being performed
2023-12-27 19:43:56 -05:00
Maya Warrier
882a716c12
Explicit curly bracket where suggested
...
Co-authored-by: Daniel Lemire <daniel@lemire.me>
2023-12-14 16:28:23 -05:00
Maya Warrier
a59a62cb5c
Merge branch 'fastfloat:main' into main
2023-12-13 17:54:05 -05:00
Maya Warrier
bdee16bcad
- Add SIMD acceleration to fast_int
...
- fix MSVC warning
2023-12-13 17:42:30 -05:00
Maya Warrier
36aaded3dd
Fix handling of leading zeros
2023-12-13 17:11:41 -05:00
Maya Warrier
1e0a9da538
Change FASTLOAT_ARM64 macro to FASTFLOAT_NEON
2023-12-13 00:56:35 -05:00
MTahaK
96c0059fe9
Revised implementation of float32_t and float64_t support as template specializations, added test
2023-12-13 00:33:16 -05:00
Maya Warrier
a30fe866f6
Fix bugs highlighted in tests
2023-12-12 22:35:58 -05:00
Maya Warrier
624ba49434
Fix more Werrors
...
- Werror=conversion,char-subscripts
2023-12-12 21:26:48 -05:00
MTahaK
4d8a2f4000
Fixed typo.
2023-12-12 19:02:10 -05:00
MTahaK
f330ec1e9d
Reverted CMakeLists changes, modifed workflow for g++13 & C++23.
2023-12-12 18:59:59 -05:00
MTahaK
d10980bc9f
Added conditions to include stdfloat, and new workflow for GCC 13
2023-12-12 18:46:38 -05:00
MTahaK
62a4129a1c
Fixed ifdef macro
2023-12-12 18:18:13 -05:00
MTahaK
eb844a1ad9
Modified cmakelist to use C++23. Fixed ifdef for fixed-width float types
2023-12-12 18:16:27 -05:00
MTahaK
cbbbc75c88
Fixed ifdef checks (incorrect syntax)
2023-12-12 17:59:04 -05:00
MTahaK
d8dbbc54ab
Updated comment for float32_t and float64_t conversions in from_chars
2023-12-12 17:56:14 -05:00
MTahaK
f74e338e0a
Added trivial support for float32_t and float64_t
2023-12-12 16:38:48 -05:00
Maya Warrier
7a21a8d6d7
Return invalid_argument in more places
2023-12-12 02:36:18 -05:00
Maya Warrier
3d446f1eba
Fix gcc werrors
2023-12-12 01:56:24 -05:00
Maya Warrier
c9527c2e4f
Skip leading zeros
2023-12-11 04:27:22 -05:00
Maya Warrier
122220e2f0
Version 1 of from_chars integer parser
2023-12-11 04:17:26 -05:00