medium10 pts · first answer countsswiftnumbers
Floating-point money errors
An invoice adds 0.1 + 0.2 for GST calculations and shows 0.30000000000000004. What type is better for money?
Discussion 0
Join free to post in the discussion.
Related questions
- Safely unwrapping a Swift optionalMobile App Developer
- Swift struct assignment copiesMobile App Developer
- Swift class shared referenceMobile App Developer
- Decoding JSON with extra keysMobile App Developer
- let compared with varMobile App Developer
- What guard let is forMobile App Developer
- Giving an optional a defaultMobile App Developer
- Type of an optional chainMobile App Developer