Strange float behaviour on Arduino Mega

That value you used above: did you choose it completely randomly or did you copy it from the output of some code running on the same system (PC/laptop)? I suspect it will have been the latter, and if you choose a genuinely random number with 15 decimal places, you will find you still get different results on the Mega compared to the PC/laptop, but neither will exactly match your chosen number.