cast to ``float`` here to avoid the cast in the ``while`` conditional