Why Int is correct? Is it not Double?

I didn’t know that Kotlin’s division is different from a mathematical division.

Nice that now you know.
Kotlin (as well as Java and C/C++) uses

  • fp double/float divide (32-64 bits)
  • integer signed/unsigned div (8-16-32-64 bits)

All of them are different from the mathematical division.

Please note that.

1 Like