Remix.run Logo
cmovq 3 hours ago

Dividing a float by zero is usually perfectly valid. It has predictable outputs, and for some algorithms like collision detection this property is used to remove branches.

woodruffw 3 hours ago | parent [-]

I think “has predictable outputs” is less valuable than “has expected outputs” for most workloads. Dividing by zero almost always reflects an unintended state, so proceeding with the operation means compounding the error state.

(This isn’t to say it’s always wrong, but that having it be an error state by default seems very reasonable to me.)

2 hours ago | parent [-]
[deleted]