News for hackers. Stuff that matters.
Re:Parsing can become accidentally quadratic because of sscanf by a1369209993 on Monday March 01, 2021 @02:14PM (#26306872)
Never perform equality tests on FP numbers period - it defeats the purpose of using floating point. This is not specific to the IEEE format.
Re:Parsing can become accidentally quadratic because of sscanf by imtringued on Tuesday March 02, 2021 @06:43AM (#26314245)
Tell that to lua and javascript developers who only have access to FP numbers.
Re:Parsing can become accidentally quadratic because of sscanf by a1369209993 on Tuesday March 02, 2021 @02:40PM (#26319529)
shrug They also only have access to IEEE FP numbers, so that applies equally much to the parent.
Re:Parsing can become accidentally quadratic because of sscanf by astrobe_ on Tuesday March 02, 2021 @03:32PM (#26320230)
If my memory serves, IEEE FP is accurate for those real numbers that are also integers (at least on some range). JS users are safe as long as they stay within the integer algebra (ie they don't use division, mainly, or perhaps round up the result). Lua users have the extra option to recompile their interpreter it uses integers.
Re:Parsing can become accidentally quadratic because of sscanf by a1369209993 on Tuesday March 02, 2021 @06:40PM (#26322781)
That's fair as far as it goes (I pedantically should have said general-purpose FP numbers), but, again, applies equally well (actually more so, since they were talking about IEEE FP specifically) to the parent post.