Thanks Jonas. I thought of changing the base this morning but I only wanted to know how far a number was over a million so I just did this
while root>1000000 do root:=root/10;
Probably not as efficient as changing base but it doesn't need the math unit and suits my purpose.
The main problem for an amateur high level programmer like me is that Frexp doesn't say it is giving base 2 results and I didn't twig it hence my confusion