On Thu, Oct 03, 2002 at 09:05:03AM -0400, Andrew Koenig wrote: > Oren> Any calculation involving a floating point number should taint > Oren> the result with inexactitude and yield a floating point result. > > Even comparisons? Comparisons could produce a third boolean value called 'Undetermined': result = A>B if result is Undetermined: print "Sorry, difference between A and B is below the error margin" print "I cannot determine which one is greater." else: print "%s is greater than %s" % tuple(('BA','AB')[result]) [Taking off absurdly-purist-hat :-] This actually gives me a serious idea: a floating-point type that helps keep track of error magnitude. It's a pair of floats (like a complex number) where the second number is an estimate or limit on the absolute value of errors in the first and is updated by all operators. An error tracking replacement for the math module would also be required. Oren
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4