Need help with floating point into array formatting

Having a function span more than one file is not a great idea. Have a function span more than 50 lines isn't
usually a good idea come to that. Shorter functions, more of them, well named. If the switch does nothing
more than call a different function for each case that's going to be much more readable and maintainable
and self-documenting...