Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
types: unconditionally divide by 2 because of integer truncation ⌊x/2⌋ (
cosmos#8202) Simplify the code in Dec.Power to unconditionally divide by 2, since: x /= 2 is the same result for both even and odd integers, and produces the floor of the result of x/2 -> ⌊x/2⌋: 99/2 ~> 49.5 ⌊49.5⌋ = 49 98/2 ~> 49.0 ⌊49.0⌋ = 49 aka "integer truncation". Fixes cosmos#7924
- Loading branch information