Talk:Approximate equality: Difference between revisions

no edit summary
No edit summary
Line 10:
 
The desired task use case is to have a method that allows tests on floating point calculations to be tested against a non-integer decimal constant, to verify correctness of the calculation, even when code changes change the floating point result in its non-significant portion.<br /><br /> Beyond that, the "can of worms" probably surrounds a) whether there should be an absolute difference that matters, versus just a relative difference, and b) whether 0.0 is different from all other floating point, because only 1/0.0 is NaN. Those "wormy" issues should not matter here.--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 02:25, 3 September 2019 (UTC)
 
==Clarify the task==
It is not clear to me if the task is asking for a function which compares two floating point values to be within a given tolerance or looking at languages implementation of floating point values. If the latter maybe [https://0.30000000000000004.com/ does 0.1+0.2=0.3] might be a useful ref.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 15:40, 3 September 2019 (UTC)
2,171

edits