Maya Warrier
091458d192
Add basic support for char32_t (unoptimized)
2023-04-30 02:23:33 -04:00
Maya Warrier
65bd922e38
Merge remote-tracking branch 'upstream/main'
...
- Fix conflicts
2023-04-26 16:47:42 -04:00
Maya Warrier
89fc24007a
Clean up
2023-04-26 16:25:41 -04:00
Maya Warrier
653790b5f3
fixes
2023-04-16 00:36:52 -04:00
Maya Warrier
c849b7a8ff
Option to forbid nan/inf, refactor
2023-04-15 23:16:01 -04:00
Daniel Lemire
11eeab5463
Removing dead code.
2023-04-11 14:29:30 -04:00
Aras Pranckevičius
21fefa5b44
Fix warnings with -Wundef
...
- FASTFLOAT_ALLOWS_LEADING_PLUS and FASTFLOAT_SKIP_WHITE_SPACE are not defined by default, and compiling with -Wundef is emitting warnigns like "FASTFLOAT_ALLOWS_LEADING_PLUS is not defined, evaluates to 0".
- Likewise for FASTFLOAT_VISUAL_STUDIO, change checks to use #ifdef for that like in other places.
- __cpp_lib_bit_cast and __cpp_lib_is_constant_evaluated are not defined pre-C++20, and are emitting a warning too.
2023-04-04 21:18:57 +03:00
Daniel Lemire
ca43e6722e
We need to update some of our exhaustive tests to the new API
2023-04-02 17:43:17 -04:00
Maya Warrier
cda25408bc
Optimize char16_t parsing for digit_comparison.h
2023-04-02 00:33:52 -04:00
Maya Warrier
2d57c09530
Fixes
2023-04-01 23:29:00 -04:00
Maya Warrier
8a9a9d538a
SIMD optimization to parse 8 char16_t at a time
2023-04-01 22:43:00 -04:00
Maya Warrier
f59f73c4da
Disable simd-related warnings
2023-04-01 04:09:00 -04:00
Maya Warrier
20f3870361
Fixes
2023-03-30 04:58:22 -04:00
Maya Warrier
2b118c843a
Experimental support for char_t types
2023-03-30 04:48:18 -04:00
Maya Warrier
b6acf38a2e
Fix bugs
2023-03-29 18:42:24 -04:00
Adam Lugowski
bfee511d78
Set errc::result_out_of_range on over/underflow
...
Best-effort values are still returned, such as 0 for underflow and infinity for overflow, but now the returned ec is set to std::errc::result_out_of_range instead of std::errc().
2023-03-29 10:14:46 -07:00
Maya Warrier
3cafcca2ff
Add support for json parsing rules and integers
2023-03-29 02:14:12 -04:00
Maya Warrier
8f94758c78
Expose parsed string (before computation) so it can be reused
2023-03-27 22:50:21 -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
Lenard Szolnoki
5b8290433c
Fix clang workaround for parsing -0 on non-nearest rounding mode
2023-03-25 19:38:44 +00:00
Lenard Szolnoki
e464bd7785
Replace memmove with copy_backward
2023-03-24 17:18:58 +00:00
Lenard Szolnoki
d34d0d7405
Fix amalgamate.ph and add header for constexpr macros
2023-03-12 10:50:25 +00:00
filipecosta90
c8886eb31d
Added missing FASTFLOAT_ALLOWS_LEADING_PLUS ifdef check in parse_infnan
2023-03-07 00:31:14 +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
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
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
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
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
252a1c9dce
Minor fix.
2023-02-06 17:22:11 -05:00
Daniel Lemire
39e04ea766
We do not need a fallback.
2023-01-27 20:59:56 -05:00
Daniel Lemire
3e2da540ef
Support rccpfastfloat.
2023-01-19 20:28:10 -05:00
Sergey Fedorov
ff7fba01d0
float_common.h: add support for ppc32
2023-01-18 14:15:14 +08:00
Daniel Lemire
c8aac4a63d
Guard endian
2023-01-07 13:28:12 -05: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
ca13367ff7
Suppress warning when comparing floats
2022-12-27 01:39:41 +00:00
Daniel Lemire
102e74891f
Merge pull request #160 from huangqinjin/uint64-to-bool
...
Fix compile warning of unit64_t to bool
2022-12-23 10:39:33 -05:00
huangqinjin
293ca61c76
Fix compile warning of unit64_t to bool
2022-12-23 19:20:28 +08:00
huangqinjin
9c4c20dd7f
Replace utf8 chars.
2022-12-18 11:04:16 +08:00
Sutou Kouhei
ff5855813f
Add missing namespace end comments
...
Other files have it.
2022-12-02 11:42:38 +09:00
Daniel Lemire
76537e1695
Fixing issue 154.
2022-11-25 15:58:54 -05:00
Daniel Lemire
003a983188
Simplifying the justification.
2022-11-18 15:38:21 -05:00
Daniel Lemire
8b7a55a03c
Minor optimization.
2022-11-18 15:33:44 -05:00
Daniel Lemire
3d0e448940
Added a remark.
2022-11-18 12:27:38 -05:00