That one is not that complicated if you don't think about the math. It's basically just if we interpret the float as int and add a magic number we have a good estimation.
From what I remember at least, it's been a little while since I implemented it.
Netcup is cheap and reliable. Based in Germany, I host my personal website and a few tools with one of their VPS. Never had a problem with them and the price is good.
Edit: If you're looking for web hosting, they offer that too alternatively.
Just a typo. Fixed it