Hacker News new | past | comments | ask | show | jobs | submit login

I was more surprised that the proposed method does not include nextafter itself, which comes with its own distinct edge cases.



Reasoning explained here: https://github.com/rust-lang/rfcs/blob/master/text/3173-floa...

TLDR: no one really uses it, the spec is ambiguous and deprecated, and those that do use it seem to be using it with constants that are usually infinities which is better suited and clearer with next_up/next_down, and those that don’t use infinities tend to assume the range of the value and pick a constant outside the range which can be dangerous if the range changes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: