floating-accuracy

c#
# How Dangerous is it to Compare Floating Point Values? 😱 ## The Issue 😕 You're working with `UIKit`, using `CGFloat` to handle resolution-independent coordinate systems. But when you need to check if a value is equal to another, like `frame.origin.x =

floating-accuracy
1 min read
Why are these numbers not equal?
# Why are these numbers not equal? 😕 You might be scratching your head, wondering why the numbers in the code above are not equal. It seems straightforward, right? 0.1 plus 0.05 should equal 0.15. 🤔 But hold on, things are not always as they appear in