4

Do you know what should be the result of dividing suppose:

11wei by 2(integer value) = ?

Thank you.

3
  • Nope. I need to divide smallest representation of ehter by two: 11wei / 2 Commented Jan 29, 2018 at 15:48
  • 1
    Right, which in the real world results in 5.5, but that's not possible in Solidity, which is exactly what the linked question talks about.
    – natewelch_
    Commented Jan 29, 2018 at 15:59
  • @flygoing still some users find my question helpful because it straightforward as the answer provided Commented Mar 18, 2018 at 8:28

1 Answer 1

14

The result of 11/2 in Solidity is 5, because there are no floating point numbers so the decimal is truncated.

Not the answer you're looking for? Browse other questions tagged or ask your own question.