3 ms·
> Strictly, you just need a way to indicate the repeating. No? It depends on your data structure, yes. You can also do the separate numerator / denominator thi
by perching_aix 1y ago
> Strictly, you just need a way to indicate the repeating. No?
It depends on your data structure, yes. You can also do the separate numerator / denominator thing, and I'm sure there are other ways too. Just that naively if you try representing it, that's when you need infinite space. Or if you do it the way IEEE-754 formats do.
- taeric 1y agoApologies, almost missed this response. Agreed that there are other ways, almost certainly. I was going with the assumption that we wanted to store positional values for that question. That is, it is only when you assume that you have to write out all decimal digits that you get people writing silly things that computers do all of the time. "0.66666...7" is an easy example. Ironically, to me, is that in written assignments you likely would have gotten knocked off points for not writing 0.(6) where () means an overbar. You definitely would lose points for rounding at the end.