Does arithmetic software for numerical analysis have arbitrary precision?

arbitrary arithmetic accuracy affected numerical analysis software

I feel that most numerical analysis programs continue to use the same floats and doubles.

If I'm right, I would like to know the reason, because, in my opinion, there are some calculations that can benefit from the use of arithmetic of arbitrary accuracy, especially when it is combined with the use of rational number representation, as is done in the GNU multipoint library .

If I am mistaken, the examples will be enjoyable.

+6
math numerical arbitrary-precision
source share
8 answers

Arbitrary accuracy is slow. So slow. And once you use a function that produces an irrational value (for example, most trigger functions), you lose an arbitrary precision advantage.

So, if you do not need or cannot use this accuracy, why spend all this processor time on it?

+7
source share

Has arithmetic arbitrary precision analysis software for numerical analysis? I believe that most numerical analysis software continues to use the same floats and doubles.

There are several unfortunate reasons that arbitrary precision (ap) is not used more widely.

  • Lack of support for important functions: missing values ​​for NaN / Infinities, lack of complex numbers or special functions, lack or erroneous implementation of rounding modes (round semi-not even implemented in GMP), lack of handlers for important events (loss of significant digits, overflow, underflow. .. ok, this is not even implemented in most standard libraries). Why is it important? Because without this, you have to invest a lot of energy in order to formulate your problem with arbitrary precision (a complex number library ever written or special functions in ap?), You cannot reproduce your double result, because ap does not have enough functions that you need to track changes.

  • 99.9% of all programmers are not at all interested in numbers. One of the most asked questions here is: "Why is 0.1 + 0.1 NOT 0.2 ???? HELP !!!" So, why should programmers invest time to study a specific implementation of an application and formulate their problem in it? If your search results deviate from duplicate results, and you do not have knowledge of numerical indicators, how will you find an error? Is the accuracy too double? Is there an error in the ap library? WHAT'S HAPPENING?! Who knows....

  • Many numerical experts who know how to calculate prevent the use of ap. Frightened by the FP hardware implementations, they insist that reproducibility is in any case "impossible" for the implementation, and the input data almost always contains only insignificant numbers. Therefore, they mainly analyze the accuracy of losses and rewrite critical procedures to minimize this.

  • Benchmark sign. Wow, my computer is FAST than others. As other commentators rightly noted, ap is much slower than the hardware supported floating point data types, because you have to program it with integer data types on hand. One of the inevitable Dangers of such an attitude is that programmers, completely unaware of the problems, choose solutions that spit out completely impressive meaningless numbers. I am very careful about GPGPU. Of course, graphics cards are much, much faster than the processor, but the reason is that accuracy and precision are less. If you use floats (32 bits) instead of doubling (64 bits), you have much fewer bits to compute and transmit. The human eye is very fault tolerant, so it does not matter if one or two results are broken. Heck, as a hardware constructor, you can use inaccurate, poorly rounded calculations to speed up the calculations (which is really good for graphics). Throw these annoying subnormal implementations or rounding modes. There is a very good reason why processors are not as fast as GPUs.

I can recommend the William Kahan page text link for some information about problems in numerical terms.

+7
source share

The Wolfram Research Institute put in a lot of effort to get arbitrary precision in the Mathematica core in a pragmatic way, and they did a great job. Mathematica will transparently perform virtually any calculation with arbitrary precision.

+2
source share

If you look at programs like Mathematica, I strongly suspect that you will find that they do not use floats and double for their work. If you look at cryptography, you will certainly find that they do not use float and double (but basically they work with integers).

This is basically a court challenge. People who feel that their product will benefit from improved accuracy and precision use arithmetic software with advanced precision or arbitrary precision. Those who do not believe that accuracy is needed will not use it.

+1
source share

Arbitrary precision does not work with irrational values. I think that computer software for numerical analysis will help turn everything upside down. Instead of understanding what accuracy is needed for the calculation, you should tell the software that you want the final accuracy to be, and all this will come up.

Thus, he can use a type of finite accuracy large enough for calculation.

+1
source share

Very rarely, you need an exact answer to a numerical problem - this is almost always the case when you need a result with a certain accuracy. This is also the case when operations are most effective if they are performed by dedicated equipment. Taken together, this means that there is pressure on the hardware to provide implementations that have sufficient accuracy for most common problems.

Thus, economic pressure has created an effective (i.e., hardware) solution for general cases.

+1
source share

This document by Dirk Laurie provides a cautionary tale of using variable precision.

+1
source share

Despite the fact that it is not directly related to your question, you can also see an article on l Trefethen

0
source share

All Articles