Flaky: datatypes for real world quantities
dimaborzov.com
Flaky: datatypes for real world quantities
1–10 of 42 posts
Re: Flaky: datatypes for real world quantities
#2Re: Flaky: datatypes for real world quantities
#3Re: Flaky: datatypes for real world quantities
#4Re: Flaky: datatypes for real world quantities
#5Re: Flaky: datatypes for real world quantities
#6Is there any bank which uses floating point for accounting?
Re: Flaky: datatypes for real world quantities
#7 x=1
for(i=0;i
You can't simplify this, so it will simply loop until it hits the datatype boundary, and then get rounded into oblivion, because the underlying floating point representation will break in the exact same way. The only way to get rid of this would be to use an arbitrary number of bits for precision, in which case... just use an arbitrary precision library instead! This is EXACTLY WHY WE HAVE THEM.Most equations that aren't trivial cannot be simplified. This datatype would only be useful for spoon-fed high school math problems. Furthermore, it costs so much CPU to perform you might as well just use an arbitrary precision library, which will probably be faster and be just as effective at preventing edge cases.
https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
Re: Flaky: datatypes for real world quantities
#8Maybe it's just me, but saying that something in current use in billions of computers around the globe is . . . somewhat of a stretch of the word "obsolete."
The numbers, in the billions, of course weren't there, but my guess is that the proportions are applicable.
Edit: After reading the article, I strongly disagree this approach is "better" in any sense of the word. More along the lines of using whale oil for the automobile instead of gasoline. Gasoline isn't perfect, but it works. Until we have something better (I.E. Electric), I'll stick to that.
Re: Flaky: datatypes for real world quantities
#9Note however, that solutions to many problems may in a sense 'non-analytic', there may be no finite set of elementary functions on a given rational number which yields the solution.
Also, iterative answers are usually the only viable way to reach solutions, they're usually much faster than the exact solution (or the floating point precision limited solution), and you can always control how good your solution is.
Observation: So in a sense what is practically used may indeed very close to the Kolmogorov complexity of the solutions - the representation as R=IterativeProblemSolve(Problem,ClosestSolution), where we publish the problem and the desired solution! (assumig we are efficiently describing the problem)
Re: Flaky: datatypes for real world quantities
#10The only place where the shoe doesn't fit is where you need a minimum accuracy. In that case what you should be doing is using integers to represent your minimum quantifiable unit.
For example, you could represent currency in millicents to give you respectably accurate rounding. Not accurate enough? Microcents then. Now you don't have enough range? Good, you're thinking about your requirements now, floating point DEFINITELY wouldn't of worked.