Hacker News new | ask | show | jobs
by adgjlsfhk1 1244 days ago
> handling branch cuts

I agree this sounds great in theory, but I don't think it works very well in practice. i.e. what about 1/(x+1)? Also branch cuts matter most for complex arithmetic, and there +-0 doesn't help since you don't know the phase of the zero. Also, realistically, floating point has finite precision so there are very few non-toy examples where you can do an actual computation and reliably end up on the correct branch. I'd rather have all the real numbers represented before we start adding hyper-reals to the number system.

> Returning a distinct value that retains the fact that it overflowed is quite useful

Agreed, and I think that NaR in Posits does a good job of that while not taking a ridiculous number of values.

1 comments

> I agree this sounds great in theory, but I don't think it works very well in practice.

I've actually done it once in practice myself. I forget the exact details, though. As I said, it is a niche use case, but it's a useful to have when you are in that niche.