LibWeb: Implement HTML spec-compliant rules for floating-point parsing

Attempt to implement HTML specs for parsing floating-point number
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-floating-point-number-values
This commit is contained in:
Khaled Lakehal 2024-10-25 14:25:04 +02:00 committed by Andreas Kling
commit 14e1e55319
Notes: github-actions[bot] 2024-10-30 09:48:30 +00:00
3 changed files with 329 additions and 5 deletions

View file

@ -0,0 +1,49 @@
Getting values (string to number)
42
-42
NaN
0
0.5
-0.5
0.5
NaN
NaN
NaN
NaN
NaN
NaN
NaN
100
0.01
1500
-0.0015
NaN
NaN
NaN
NaN
NaN
NaN
0
NaN
1e+308
-1e+308
NaN
NaN
Setting values (number to string)
42
-42
0.5
-0.5
100
0.01
1500
-0.0015
error
error
1e+308
-1e+308
error
error
0
0
0