066dbc2f0c
Fixes undefined behavior, and fixes the logic for negative powers of ten. Fixes #51764. Adds tests to validate the changes and prevent regressions. Adds docs for `String.num`.