SixNein
Gold Member
- 122
- 20
Hurkyl said:SixNein -- I really think you are so focused on the point you want to convey that you are overstating yourself (e.g. you repeatedly creep into assertions about "all number systems") and , and you are not recognizing the variations that others are talking about (e.g. matrix seems to point out that any particular rational arithmetic calculation can be done with finite precision in radix form for many bases)
I think we are just on different pages, and it didn't help for the discussion to be broken into two posts. For example, I was the first to mention that number libraries can be used. The discussion began with the issue of making exact floating point comparisons in programming languages for rational numbers. A programmer might do a calculation like 5 * (1/5) and try to do an exact comparison of 1 and the result. When the test fails, the programmer is surprised.
My argument here is that it doesn't matter what number system is being used for the calculation because programmers will always get into trouble when doing floating point comparisons. The mathematical reason is that only a subset of rational numbers can be stated exactly as reals for any particular base, and the rest will be approximated. So the only way to get around this issue is to work with rational numbers as fractions and avoid real conversions altogether.
There is nothing special about binary that causes this issue of floating point comparisons to occur. The only difference between using binary and decimal is the subsets one would get that can be stated exactly as reals, and this difference is due to the arithmetic being performed to come up with the real.