Hacker News new | ask | show | jobs
by ketzu 1467 days ago
> rationals aren't even the same number set

In what way are rationals not the same number set? In the strictest sense basically none of the proposed versions have the same number set, but in a broad sense, they all represent a useful subset of rationals, right?

1 comments

In a broad sense, sure.
Could you elaborate what your intended meaning was? It felt to me like you were singeling out 'rationals' as not being the same number set. Maybe we also think of something different when talking about 'rationals'?

Maybe I also missed something obvious, so I'd like to satisfy my curiosity!

I meant that rationals are a subset of the reals, and while floats are also a subset of exact reals a "typical" fixed bitwidth implementation will have a significantly greater range in floats than rationals.

I don't know that it's necessarily as significant a difference as I'd first considered it to be, though.

You can't do trigonometry on the rationals, which would prevent any games, graphics software, audio mixing software etc from using the rationals.
I mean, you can, but you shouldn't. I don't think anyone is arguing that any representation is suitable for all usecases or that ieee754 should not be available in programming languages.

Also, I think I'm too tired by now, I get confused too much between the rationals as the rational numbers \mathbb{Q} and the rationals as an implementation of rational numbers using a quotient of two integers.