Remove real type

strtr strtr at spam.com
Thu Apr 22 16:34:20 PDT 2010


Walter Bright Wrote:
> 
> In my experience doing numerical work, loss of a "few bits" of precision 
> can have order of magnitude effects on the result. The problems is the 
> accumulation of roundoff errors. Using more bits of precision is the 
> easiest solution, and is often good enough.

My work is probably not classified as numerical work as I don't much care about the results. I only care about solutions solving the problem.
like this: 
x * 1.2 = 9;
I don't care what x should be for this calculation to be 9, as long as there is a x which satisfies the calculation (or does so close enough).
What does interest me is that the x found would yield the same result on another computer because as you say; errors accumulate. 

> 
> In Java's early days, they went for portability of floating point over 
> precision. Experience with this showed it to be a very wrong tradeoff, 
> no matter how good it sounds. Having your program produce the crappiest, 
> least accurate answer despite buying a powerful fp machine just because 
> there exists some hardware somewhere that does a crappy floating point 
> job is just not acceptable.
> 
> It'd be like buying a Ferrari and having it forcibly throttled back to 
> VW bug performance.

More like creating the best ever seating for a VW bug and then expecting it to be even better in the Ferrari; it might be, but most probably, it won't.



More information about the Digitalmars-d mailing list