Closed
Description
Today I learned that eight to the power of eight is zero. Who'da thunk?
Incorrect:
2u8.pow(500)
➡️ 0
❌
8u8.pow(8)
➡️ 0
❌
4u32.pow(1000)
➡️ 0
❌
Correct:
8u8.pow(7)
➡️ overflow ✅
8i8.pow(8)
➡️ overflow ✅
2u8.pow(9)
➡️ overflow ✅
Oddly enough, this one breaks the pattern:
2u8.pow(10)
➡️ overflow ✅
Haven't bothered with further cases; at this point it's probably best to just look at the implementation and see what's going on.
Metadata
Metadata
Assignees
Labels
No labels