I think you cannot do it as accurately as you may intend.
1/25 = 0.04 = 0.000010100011110101110000101... (2) is not your friend. It's regular, but not with few enough digits to be particularly useful.
1/3 = 0.33333333.... = 0.010101010101... (2) is not too bad. It's at least regular with only two digits.
You are going to have machine precision problems no matter what you do.
Whatever you do, you will have to stay aware of exactly what error exists and when and where you can ignore it and when and where it stacks up and comes back to bite you.
Just my opinion. Again, I may have no idea what I'm talking about. I've sort of been leaning that way this week.