webpage
webpage copied to clipboard
Fix the python output in "Floating Point Numbers" section in "Python Fortran Rosetta Stone" page
Fixed the Python output in the "Floating Point Numbers" section in the explanatory notes.
The result in Python cell, in line 4
f = float(1 / 2) # 0.0
seems wrong in Python 3.11, numpy 1.26.4. It should be 0.5.
And I also tried float32(1/2), it returns the same result.
f = float(1 / 2) # 0.0 seems wrong in Python 3.11, numpy 1.26.4. It should be 0.5.
Yes, it was correct in Python 2, but for Python 3 the behavior of / for two ints changed.