human-readable: calculate numbers in a loop
This drops a lot of else if blocks and extends units by "E", "Z" & "Y".
Ismail
Updated - here, and in #459 with some additional changes.
Ah, yes... Unlikely to hit this 😁️ - but you are right.
But it should be fine when using an unsinged data type? Switched to uint64_t.
I would like to keep the variable, as a follow-up commit (currently in 61802acbff8d02c30ebdf06dcf3d7ff28d8b0f27) re-uses it.
I did not want to say that the case is irrelevant, we should definitely get this right. I just wanted to explain why my mind did not came up with this. 😉️
Same for the overflow in calculation - I was not aware of this.
Updated again, I hope it is ok now. Thanks a lot for the detailed review!
@tridge Could you review and merge when available, cheers mate!
@eworm-de I will also have a more thorough look at 459 within the next 24-48 hours, thank you for your work thus far.
Thanks a lot, and you are welcome!
Let me know if you want #459 to be split into smaller pull requests for review.
Let me know if you want #459 to be split into smaller pull requests for review.
It's small enough, that'll be fine.