Fractions of a penny are not a real thing and lead to difficult bugs.
The two most common practices for monetary values are:
- Storing everything as pennies, and then remembering to convert to dollars on display. This can also be tricky when doing calculations, as you need to always remember that these are penny values.
- Use a Money class. This uses the Value Object pattern to restrict what kind of values a Money object can have. It also forces all calculations to be made with more purposeful intent.