Post Reply 
Toward an API for the real numbers
10-05-2020, 03:13 AM
Post: #2
RE: Toward an API for the real numbers
(10-05-2020 01:19 AM)Bill Duncan Wrote:  Thought this (and the ACM paper referenced) might be of interest here..

Nice find. Thanks for sharing.

Quote:Results don’t display as users expect, for example using IEEE double precision and Java output formatting rules, 0.1 + 0.7 = 0.77999999999999999, and not the expected 0.8.

Most calculators and spreadsheets are programmed with BCD instead of IEEE754 for many reasons, including these obvious issues. There isn't anything inherently surprising here.

I don't understand the rationale of this API. The application that started the work on the API was a calculator, which can use any available libraries and general knowledge that exists to get this right. This work sounds more of an excuse to look for a reason to fix (or hide) their calculator bugs with a new shiny API to assign properties to numbers. Seems that they found out that a calculator is not just a trivial piece of Java code to operate on IEEE754 floats and doubles (with accurate rationals represented in other ways e.g. a pair of bigint.)

Quote:"To our knowledge, this is the first exploration of a practical general purpose real number type that both reflects the mathematical laws of the real numbers, and also supports exact comparisons in situations in which that’s normally expected."

That is quite a claim with a dose of arrogance. First off all, one has to be careful using the phrase "real numbers" (not in general constructible) versus floating point (rationals, constructible). Secondly, uniformly representing and implementing operations and comparisons on floating point, rationals, and irrationals (typically pi, e, and sqr2) isn't new. Thirdly, algebraic laws generally don't hold on floating point so claiming that the API "reflects the mathematical laws of real numbers" is sketchy, see e.g. "What every computer scientist should know about floating-point arithmetic"

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Toward an API for the real numbers - robve - 10-05-2020 03:13 AM

User(s) browsing this thread: