Very intetresting results.I would like to add that testing for example some values which can not be exactly and accurately represented by the binary computer can be also insightful.Also catastrophic cancellelation impact on the accuracy of floating point addidtion(with different sign) or subtraction of very close values would be also interested to test.Finally I would like to recommend you a great book about the accuracy of floating point calculation "Real computing made real".
>>>Thanks. There are so many good books around and, as usual, there is not enough time to read all of them.>>>
Completely agree with you.
That book has very interesting examples of mathematical calculations where floating point inaccuracy can be "catastrophic" to the results.If you want I could bring a few examples ffrom the book (there is need to code it).One of the examples is convergence failure of sine taylor expansion.During my tests I was able to obtain convergence up to radian value of 8.
When using extra precision accumulation of dot products, it's usual to promote the multiplication as well:
Although I sometimes try to push validation tests into x87 64-bit precision mode (where the extra precision multiplication is "free"), Kahan sum:
works reliably (but even slower), if the compiler is set in a standards-compliant mode. It's also a test of a compiler's parenthesis-eliding modes; if a compiler elides parentheses consistently, the result drops back to the same as a plain sum, rather than being destroyed.
Sergey Kostrov wrote:
>>...Will you be interested in test case of arbitrary precision arithmetics which is based on Java Big Decimal library?
If you continue asking me similar questions ( and you've asked me at least three or four times already in the past ) I will be forced to report it to IDZ management.
Sorry, but you've "crossed the line" already.
I simply wanted to create a different thread solely for the purpose of comparision of accuaracy of arbitrary precision arithmetics vs single and double floating point arithmetics.My intention was to post my test cases and to get an input from the users.
Sorry if you have misunderstood my post.I did not want "to force" anyone to test my code.