If you want a simple solution for numbers with only a limited number of digits after the dot then you can always use multiplication.
Say, if you already know that your number will never have more...