mg wrote: > Is it a bug or a control behavour ? I don't understand ?!?!?!?!... It's a case of applying different float-to-text rounding in different situations, on a variable that (even after round()) is not representable in binary floatingpoint. "print var" does one sort of string conversion (using str()), "print [var]" does another type (using repr() on the list element). The underlying value is the same, it's just printed differently. >>>> var = round(0.5**0.5, 2) >>>> var > 0.70999999999999996 >>>> print var > 0.71 >>>> print [var] > [0.70999999999999996] >>>> print str(var) > 0.71 >>>> print repr(var) > 0.70999999999999996 >>>>
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