Add the string to floating point conversion functions.
Long doubles aren't supported yet, but floats and doubles are. The
primary algorithm used is the Eisel-Lemire ParseNumberF64 algorithm,
with the Simple Decimal Conversion algorithm as backup.
Links for more information on the algorithms:
Number Parsing at a Gigabyte per Second, Software: Practice and
Experience 51 (8), 2021 (https://arxiv.org/abs/2101.11408)
https://nigeltao.github.io/blog/2020/eisel-lemire.html
https://nigeltao.github.io/blog/2020/parse-number-f64-simple.html
Using fputil:UInt is probably an overkill here if all you want is a 128-bit integer. You should probably use __uint128_t. For the access to the individual 32-bits words, you can use a MutableArrayRef: https://github.com/llvm/llvm-project/blob/main/libc/utils/CPP/ArrayRef.h#L123.
So, something like this:
To reduce verbosity, you can may be define:
That said, I will leave it up to you to decide which is more readable.