240 Commits

Author SHA1 Message Date
IRainman
59c873d028 cleanup. 2025-12-28 16:43:33 +03:00
IRainman
0d36a018ef Doctest DOCTEST_CONFIG_SUPER_FAST_ASSERTS 2025-12-26 00:49:05 +03:00
IRainman
350ad6ecac unfck lint 2025-12-26 00:22:44 +03:00
IRainman
cdabfe49af # constexpr noexcept 2025-12-25 23:00:52 +03:00
IRainman
be4683501e fix for biodegradable code in doctest. 2025-12-25 19:37:41 +03:00
IRainman
325c7236e7 MSVC compilation fix. 2025-12-25 19:16:26 +03:00
IRainman
7041f91d47 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-25 11:33:24 +03:00
Shikhar
97cb3ec28d lint
Signed-off-by: Shikhar <shikharish05@gmail.com>
2025-12-25 03:06:22 +05:30
Daniel Lemire
120bdfd713 adding some ipv4 test 2025-12-24 15:43:43 -05:00
IRainman
ac1e4dd805 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-12-24 22:15:34 +03:00
Daniel Lemire
6b72e26ba7 documenting better which types we support 2025-12-15 10:28:06 -05:00
IRainman
597c239218 # test fixed. 2025-11-10 03:13:05 +03:00
IRainman
b8163709f5 * type usage fix for better performance in any hardware. 2025-11-10 02:41:26 +03:00
IRainman
c8e4d89fef # unfck lint 2025-11-09 18:15:53 +03:00
IRainman
959c9531ea # cycles (for and while) cleanup in low level for the best compiler optimization and the best runtime. 2025-11-09 18:13:17 +03:00
IRainman
50fa3ad99e * code cleanup. 2025-11-09 16:34:42 +03:00
IRainman
9e1d063628 # tests 2025-11-09 00:12:43 +03:00
IRainman
77ef46838c * try to fix precision error on x86 platform step3. 2025-11-08 19:40:24 +03:00
IRainman
fe0bce5eb7 # const and constexpr fixes
# types fixes.
# FASTFLOAT_ASSERT fix.
2025-10-21 21:08:08 +03:00
IRainman
031f7febbe # tests are updated 2025-10-21 19:31:28 +03:00
IRainman
0f1a96a389 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-10-21 15:43:38 +03:00
Pavel Novikov
88f6c5e367
Added corner cases around max value/infinity 2025-10-04 14:39:00 +03:00
Pavel Novikov
e9438e64ba
fixed copy&paste error and minor mess 2025-09-29 19:54:25 +03:00
Pavel Novikov
7abb574ffc
added doc to README and examples 2025-09-29 13:00:40 +03:00
IRainman
af8ece24d7 Merge branch 'main' of https://github.com/fastfloat/fast_float 2025-09-18 22:10:37 +03:00
Pavel Novikov
01e505797b
added tests + some refactoring 2025-09-18 21:29:25 +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
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
Pavel Novikov
e12463583f
added lacking overloads to avoid potential ambiguity 2025-09-06 00:12:41 +03:00
Pavel Novikov
6702cd4244
added doc section in the README,
added example code test executable
2025-09-05 13:36:23 +03:00
Pavel Novikov
20a7383442
renamed the function, cleaned up return type 2025-09-05 13:36:23 +03:00
Pavel Novikov
763558b9ac
cleaned up tests 2025-09-05 13:34:48 +03:00
Daniel Lemire
42db9ac1de
Merge branch 'main' into P2497R0 2025-09-03 12:04:36 -04:00
Pavel Novikov
cc90f240ee
added some tests 2025-09-02 23:03:38 +03:00
Daniel Lemire
2d2b42bb38 forked doctest 2025-06-03 18:15:52 -04:00
Daniel Lemire
73b27b7d68 hmmm 2025-06-02 09:52:34 -04:00
Daniel Lemire
a1e272f515 lint 2025-05-19 18:16:14 -04:00
Daniel Lemire
0458c20061 adding missing file 2025-05-19 18:09:34 -04: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
a72afb539f unfck clang format 2025-05-12 16:45:40 +03:00
IRainman
42131710b7 compilation fix for internal tests 2025-05-12 15:28:42 +03:00
IRainman
e5f189754f compilation fixes. 2025-05-06 21:05:05 +03:00
IRainman
99d769db5b clang-format 2025-05-06 18:15:43 +03:00
IRainman
9049a1a511 clang-format. 2025-05-06 14:26:20 +03:00
IRainman
f8625b6416 fix warnings. 2025-04-10 18:45:05 +03:00
IRainman
6cacae0782 trying to fix tests. 2025-04-10 17:37:09 +03:00
IRainman
2da25b51c8 trying to fix tests. 2025-04-10 00:49:16 +03:00
IRainman
cd5db6f5e9 lint 2025-03-12 21:34:31 +03:00
IRainman
c08b7b12a6 tests updated 2025-03-12 21:26:31 +03:00