Representing reals as fractions (rationals) goes a long way toward achieving this goal.
The real numbers are notoriously non-equivalent to the rational numbers.
Toward an API for the Real Numbers
11–20 of 85 posts
Re: Toward an API for the Real Numbers
#12Re: Toward an API for the Real Numbers
#13Re: Toward an API for the Real Numbers
#14Re: Toward an API for the Real Numbers
#15Then you have a scientist reading this, wants it for research and then wonders why a simple 3 lines in Python code takes 3 days to complete. True story!
Re: Toward an API for the Real Numbers
#16Tangentially related, the stock Android calculator app is fantastic. It has good accuracy as mentioned in the article and an easy to explore and use history. It is one of the few things that will make me hunt around for my phone when I am working on my desktop.
Re: Toward an API for the Real Numbers
#17Re: Toward an API for the Real Numbers
#18Representing reals as fractions (rationals) goes a long way toward achieving this goal.
Re: Toward an API for the Real Numbers
#19In "safe" languages we often talk about how you can't ignore errors in return values. Your program "leaks" if that happens. But with integer overflows and floating point precision, we just ignore the leaks as something that programmers already know about and have to consider while coding. Of course, it's not an easy problem to deal with, as computers don't have infinite memory and they need to be performant, but we r…
It's poor because it's undecidable. We would ideally want to work with the real numbers, but no computational model can represent all real numbers (by a trivial cardinality argument).
Obviously, we can make useful progress in practice and evolve beyond the floating point representation (at least for general tasks), similar to what we did for other theoretically undecidable problems (like garbage collectors), but let's not pretend it's something that's easy to fix.
The paper is interesting and talks about very real problems, but it's still a far cry from something that can be used in production.
Re: Toward an API for the Real Numbers
#20https://github.com/microsoft/calculator/blob/master/src/Calc...