News for hackers. Stuff that matters.
Re:Why does 0.1 and 0.2 = 0.30000000000000004? by Kon-Peki on Wednesday February 08, 2023 @02:27PM (#34713462)
Objective-C has a really nice decimal math library. Last I looked (it’s been a while), Swift didn’t. It might have one by now.

Years ago, I had a few apps in the App Store that made extensive use of it. It really was very nice to work with.

Re:Why does 0.1 and 0.2 = 0.30000000000000004? by arcticbull on Wednesday February 08, 2023 @02:51PM (#34713870)
Swift has the same functionality in the Decimal type.
Re:Why does 0.1 and 0.2 = 0.30000000000000004? by Kon-Peki on Wednesday February 08, 2023 @03:15PM (#34714273)
Thanks! It looks like that was added in Swift 3. That was a long time ago. I guess I’m just really old ;)