move the random fp string formatting to shared library