You can recursively while loop divide an int by 10, compare to 0 and eventually you’ll arrive at a value. Or simply:
…instead.
It’s a bit more complicated for a float because of [the precision errors][2] but for as long as you know how many fractional digits you need, you can also: