you've probably seen me say it before, but I think == on floats is bad pl design generally. the majority of the times it's used one of the following is true:
Picking an appropriate epsilon value is also often nontrivial. There’s some pretty decent discussion of it here, in the context of figuring out what to do about it in Swift. https://github.com/swiftlang/swift-evolution/blob/main/proposals/0259-approximately-equal.md