448 Commits

Author SHA1 Message Date
IRainman
58b5dc04c3 * Upgrade manually vectorized code to SSE4.2 for FASTFLOAT_64BIT because it's already used SSE4.1 instructions. 2025-10-22 00:27:36 +03:00
IRainman
1f0e2819e0 # type usage fix. 2025-10-21 22:40:41 +03:00
IRainman
eee068d3bc # types fix. 2025-10-21 22:19:04 +03:00
IRainman
336b97d027 # cleanup. 2025-10-21 22:01:22 +03:00
IRainman
487799ede2 # cleanup and speedup digit_comp. 2025-10-21 21:49:21 +03:00
IRainman
0e123c5e82 # fix for digit_comp. 2025-10-21 21:31:19 +03:00
IRainman
5a378ed87f # minimize diff in the crutch. 2025-10-21 21:14:58 +03:00
IRainman
fe0bce5eb7 # const and constexpr fixes
# types fixes.
# FASTFLOAT_ASSERT fix.
2025-10-21 21:08:08 +03:00
IRainman
1dc13a91f1 # improve checking for integer in the FASTFLOAT_ONLY_POSITIVE_C_NUMBER_WO_INF_NAN mode. 2025-10-21 19:56:43 +03:00
IRainman
3288e56b34 # compilation fix after merge 2025-10-21 18:18:20 +03:00
IRainman
240d393bf6 # format 2025-10-21 16:25:35 +03:00
IRainman
72e75ed98f # compilation fix after merge. 2025-10-21 16:16:18 +03:00
IRainman
0f1a96a389 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-10-21 15:43:38 +03:00
Pavel Novikov
1ea4d2563e
made function non-template
+fixed a couple of typos
2025-09-30 12:18:29 +03:00
Daniel Lemire
7262d9454e lint 2025-09-29 15:08:24 -04:00
Daniel Lemire
fd98fd6689
specialize for std::float32_t and std::float64_t explicitly
credit: @lemire
2025-09-29 21:43:36 +03:00
Pavel Novikov
197c0ffca7
clang format 2025-09-29 21:43:35 +03:00
IRainman
fe376285c7 # types fix after merge from upstream. 2025-09-18 23:57:54 +03:00
IRainman
384fcec12d # clang format 2025-09-18 22:57:06 +03:00
IRainman
097800a609 # compilation fix after merge from upstream. 2025-09-18 22:41:24 +03:00
IRainman
af8ece24d7 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-09-18 22:10:37 +03:00
Pavel Novikov
13345cab65
added template overload for integer_times_pow10() 2025-09-18 21:29:25 +03:00
Daniel Lemire
88b1e5321c version 8.1.0 2025-09-18 09:38:45 -06:00
Daniel Lemire
2aa6d0ba72
Merge pull request #326 from fastfloat/patch803
Release candidate 8.0.3
2025-09-18 09:37:20 -06:00
Daniel Lemire
0b6d911220 format 2025-09-18 08:30:28 -06:00
Pavel Novikov
7a77227521
minor fix of forward declaration 2025-09-18 17:02:29 +03:00
Daniel Lemire
e20c952456
Merge pull request #320 from toughengineer/int_multiplication_by_power_of_10
Implemented multiplication of integer by a power of 10
2025-09-18 07:48:09 -06:00
Daniel Lemire
bb956b29db release candidate 8.0.3 2025-09-18 07:44:53 -06:00
Daniel Lemire
48fc5404d4 compatibility fix 2025-09-18 07:44:05 -06:00
IRainman
10970dbbae # cleanup 2025-09-17 00:52:26 +03:00
IRainman
e3aa99448a # fix for stackvec constructor. 2025-09-16 21:45:58 +03:00
IRainman
af1f8e3ac2 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-09-16 00:58:58 +03:00
InvalidUsernameException
9d81c71aef Do not mis-parse certain wide-character emojis as integer
When calling ch_to_digit() with a UTF-16 or UTF-32 code unit, it simply
truncates away any data stored in the non-low byte(s) of the code unit.
It then uses a lookup table to determine whether the low byte
corresponds to an ASCII digit. This is incorrect because as soon as any
bit outside the low byte is set, the number will never correspond to a
ASCII digit anymore.

To fix this, we produce a mask that is all zeroes if any bit outside the
low byte is set in the code unit, all ones otherwise. Anding this mask
with the original code unit forces the table lookup to return the
sentinel value from the zero-index if any high bit was set and causes
the code unit not to be parsed as integer.

This bug was discovered when loading Mastodon posts inside the Ladybird
browser where some of Mastodon's JavaScript would trigger the code path
that erroneously parsed the emoji as integer. It had the visible effect
that some digits inside the posts would get rendered as one of the
emojis that parsed to that digit. For more details see this issue:
https://github.com/LadybirdBrowser/ladybird/issues/6205

The emojis in the test case are simply all the emojis used on Mastodon
that caused the bug. They can be found here:
06803422da/app/javascript/mastodon/features/emoji/emoji_map.json
2025-09-15 23:12:28 +02:00
WenLei
6677924083 float_common.h: Support RISC-V 2025-09-11 11:11:30 +08:00
Pavel Novikov
0a230326ab
now finally got the anti-ambiguity overloads right, right? 2025-09-06 02:22:43 +03:00
Pavel Novikov
7ae62ee0d5
finally got the anti-ambiguity overloads right? 2025-09-06 02:10:55 +03:00
Pavel Novikov
e12463583f
added lacking overloads to avoid potential ambiguity 2025-09-06 00:12:41 +03:00
Pavel Novikov
20a7383442
renamed the function, cleaned up return type 2025-09-05 13:36:23 +03:00
Daniel Lemire
42db9ac1de
Merge branch 'main' into P2497R0 2025-09-03 12:04:36 -04:00
Pavel Novikov
6be07d66a8
inlining Clinger's fast path because why not,
and it seems to bring performance to the level before the changes somewhat
2025-09-03 16:59:40 +03:00
Daniel Lemire
c0582c27f5 typos in the comments 2025-09-02 17:29:12 -04:00
Pavel Novikov
a134561e4b
added missing inline specifiers 2025-09-02 23:03:38 +03:00
Pavel Novikov
7b8f04500a
implemented multiplication of integer by power of 10 2025-09-02 13:20:36 +03:00
Daniel Lemire
81b8306c5f implementation of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2497r0.html 2025-05-19 18:08:36 -04:00
IRainman
5ae2fba79d cleanup for parse_number_string 2025-05-10 19:59:22 +03:00
IRainman
437a80ccfd fix for type usage in parse_int_string 2025-05-08 18:19:45 +03:00
IRainman
978441a5bb additional FASTFLOAT_HAS_BIT_CAST improve for older standards. 2025-05-07 23:19:18 +03:00
IRainman
a550415314 additional fix for bfloat16_t. Sorry, I can't compile it's locally. 2025-05-07 22:55:48 +03:00
IRainman
7bac32408e fix for the parse_number_string 2025-05-07 22:14:55 +03:00
IRainman
f14d482767 fix for the parse_number_string 2025-05-07 21:59:53 +03:00