Now, once I have figured how to handle the very large numbers in PHP I should be in good shape.
Can you use bc (see PHP: BC Math?Code:
echo 26959535291011309493156476344723991336010898738574164086137773096960 / 4306949573981.513 | bc
6259542822111301937734005144785305510317670759324150579
The actual arithmetic (floating point) was not too much of a problem, the challenge was converting the result to hex. I managed to find a bit of code on the web which did the job a treat.
https://stackoverflow.com/questions/5301034/how-to-generate-random-64-bit-value-as-decimal-string-in-php/5302533#5302533
(Section 2 of the above link.)