For anyone who stumbles upon this post as I did. You probably already tried the math approach and got some weird non precision number. UE4 for some reason returns a number that is 0.000001 below the expected result.
However there is good news, while it does take a bit more CPU to do the String array conversion method does work.
Edit: Should be noted though the converting back to a float in the string array or the toText example will cause the same issue as the Math example. So you are stuck with using the float as a string if you want the precision to remain intact.