3 ms·
That’s my point though. Infinity isn’t useful for computation in a lot of cases where numbers are called for and it’s debatable that it even is a number. So it’
by sevensor 2y ago
That’s my point though. Infinity isn’t useful for computation in a lot of cases where numbers are called for and it’s debatable that it even is a number. So it’s already a special error value, and if that’s the case, why use a value that accidentally behaves like a number sometimes?
- pron 2y agoBecause you're not writing a program. You're writing an abstract algorithm and this makes the algorithm slightly simpler to express without losing anything. If you don't like that, you can use a special error value instead even in your abstract description.