typed_python icon indicating copy to clipboard operation
typed_python copied to clipboard

stringification of floats is not identical in the compiler and the interpreter

Open braxtonmckee opened this issue 2 years ago • 1 comments

Sometimes we get a different number of digits. We should try to get it to be identical.

braxtonmckee avatar Feb 03 '23 20:02 braxtonmckee

    def test_str_of_float(self):
        @Entrypoint
        def strOf(f):
            return str(f)
    
        f = 16123.123123123
        assert strOf(f) == str(f)

braxtonmckee avatar Feb 03 '23 21:02 braxtonmckee