5 ms·
That sounds interesting, but I would imagine it would become very complicated once you start applying nontrivial functions (discontinuous functions, for example
by mvanaltvorst 6y ago
That sounds interesting, but I would imagine it would become very complicated once you start applying nontrivial functions (discontinuous functions, for example). In that case the range of possible values could actually become discontinuous. I would imagine accounting for that is actually more computationally expensive than just using arbitrary precision decimals.
- OskarS 6y agoYeah, you call tan() on that number, and suddenly your interval is like most of the number line. Actually, you don't even have to be that fancy: if the number is close to epsilon, the error bars on 1/x would be huge.
- crazygringo 6y agoBut isn't that a feature, rather than a bug? It prevents you from getting "false accuracy".
- klyrs 6y agoYes, that's a feature. If you're using interval arithmetic and your result is an unreasonably large interval, then there's a good chance the algorithm in use is numerically unstable.
- yarg 6y agoSure, but what's the use case for mathematics where you don't know what side of an asymptote you're on?
- deleted 6y ago[deleted]
- thaumasiotes 6y ago>> if the number is close to epsilon, the error bars on 1/x would be huge. > Sure, but what's the use case for mathematics where you don't know what side of an asymptote you're on? Knowing which side of the asymptote you're on does not solve this problem or even ameliorate it.
- yarg 5y agoThat's not what I'm saying - it seems to me to be programmer error that such a question is being asked (an exception should be thrown regardless, since the result is not of a usable quality).