Post Reply 
Why Intel decimal library?
03-11-2014, 10:33 PM
Post: #3
RE: Why Intel decimal library?
As Marcus wrote, the 34S uses a modified decNumber library for its basic arithmetic. Internally I work with higher than decimal128 precision and convert before and after operations. In this case, of not using decmial64 or decimal128 for much bar storage) even those old comparisons indicate that the Intel library would be faster. The comparison is somewhat misleading in that there isn't mention of the many functions included in the Intel library but not in decNumber (but not vice versa). I also wouldn't be concerned about the type conversion benchmarks, the two libraries, by default, use different ways to store the mantissa internally and the decNumber flavour makes format conversions very quick -- these aren't done all that often compared to the number crunching.

The first major difference between the Intel library and decNumber is the support for transcendental functions. decNumber implements e^x and log and that's it (well, it has square root). On the 34S we don't even use the decNumber log since it is extremely slow. The Intel library implements all these plus the trigonometric functions, the hyperbolic functions and gamma and probably some others too. They are also fairly accurate implementations, usually with an error bound in the last digit published.

The other big difference between the two libraries is their size. The Intel library is large. Very large. It uses lots of look up tables to reduce functions to one of many low degree polynomial or rational approximations. This makes it very fast.

If you have the space, use the Intel library. You get a large suite of well tested fast functions. If you are tight for space, use decNumber and crib the transcendentals etc from the 34S project. You'll get a slightly larger set of functions that aren't as well tested or fast but which are tightly coded.


- Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Why Intel decimal library? - Claudio L. - 03-11-2014, 12:35 AM
RE: Why Intel decimal library? - Paul Dale - 03-11-2014 10:33 PM
RE: Why Intel decimal library? - Paul Dale - 03-12-2014, 01:45 AM



User(s) browsing this thread: 1 Guest(s)