The following code only contains float/double to decimal and does not contain decimal to string.
Algorithm source code and demonstration link : https://onlinegdb.com/OPKdOpikG
This algorithm is based on the schubfach algorithm and is faster than the dragonbox algorithm.
Thank you.