0

Here is a screen shot of run of "is.integer()" in Python 3

Why two floats 5.0-3.0 =2.0 returns an integer, while 5.9-3.9=2.0 does not?

wjandrea
  • 28,235
  • 9
  • 60
  • 81
Adam Wang
  • 1
  • 1
  • 1
    Welcome to Stack Overflow! Please take the [tour]. [Please don't post pictures of text](https://meta.stackoverflow.com/q/285551/4518341). Instead, copy the text itself, [edit] it into your post, and use the formatting tools like [code formatting](/editing-help#code). For more tips, see [ask]. – wjandrea Nov 25 '21 at 21:31
  • 2
    crucially, `5.9-3.9 != 2.0`. `5.9-3.9 == 2.0000000000000004` – wjandrea Nov 25 '21 at 21:32

0 Answers0