3

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

11wei by 2(integer value) = ?

Thank you.

  • Nope. I need to divide smallest representation of ehter by two: 11wei / 2 – alexey polusov Jan 29 '18 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. – flygoing Jan 29 '18 at 15:59
  • @flygoing still some users find my question helpful because it straightforward as the answer provided – alexey polusov Mar 18 '18 at 8:28
13

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.