▲ | tomp 5 days ago | ||||||||||||||||
"nice, correct numbers" end somewhere between 1/3 and sqrt(2) so in reality, it's just "pick your own poison" to various degrees... | |||||||||||||||||
▲ | tialaramex 5 days ago | parent | next [-] | ||||||||||||||||
The square root of two is still a computable Real. We choose not to cope with that, but it's not actually impossible it was merely inconvenient. I've mentioned elsewhere that my Rust care realistic is quite happy to work with these numbers e.g. take the square root of ten, and the square root of forty, multiply them together and get the quite ordinary integer twenty. The non computable reals are a huge problem because, as their name suggests, we can't compute them - and in the strict sense that's Almost All reals, but none of the ones you're thinking of are non-computable so you'll likely be fine. For the merely rational numbers like a third, or sixteen hundred and five sevenths, it's even more so a matter of choosing not to address it rather than it being out of reach. | |||||||||||||||||
| |||||||||||||||||
▲ | int_19h 5 days ago | parent | prev [-] | ||||||||||||||||
Even so, we don't need to pick the more potent poison. And most certainly not when we had decades of awareness about better alternatives. There's really no excuse for a modern PL to not have, at the very least, overflow detection by default. |