]> git.kaiwu.me - quickjs.git/commit
Improve Number.prototype.toString for radix other than 10
authorCharlie Gordon <github@chqrlie.org>
Sat, 2 Mar 2024 14:13:18 +0000 (15:13 +0100)
committerCharlie Gordon <github@chqrlie.org>
Sat, 2 Mar 2024 14:13:18 +0000 (15:13 +0100)
commit8d64731eb892ddf8ea81d4050e8d9075aa4ee954
treeb083653d1a012eba727a9b0cbea59e791e50ef17
parenta78d2cbf7ca0f2769e25618868beeb2e6ca440e7
Improve Number.prototype.toString for radix other than 10

- fix the conversions for integers and exact fractions
- approximate approach for other cases.
- bypass floating point conversions for JS_TAG_INT values
- avoid divisions for base 10 integer conversions
quickjs.c