In kv-0.4.54, I added several files for making use of this Intel 80-bit floating-point arithmetic unit.
Until version 0.4.55, the _Float64x type was used for 80-bit floating-point numbers. However, starting with g++ 13, _Float64x became incompatible with libstdc++, making this type unusable. Therefore, the features related to 80-bit floating-point numbers were disabled for g++ 13 and later.
In version 0.4.60, this feature was restored by using long double. Since the best type to use may change again in the future, the policy is to define kv::fp80, which is currently an alias for long double, and write code using that type. To use 80-bit floating-point numbers, include:
#include <kv/fp80.h>This header file checks whether 80-bit floating-point numbers are available. If they are available, it defines the macro KV_HAVE_FP80 and defines the type as follows:
using kv::fp80 = long double;If you write programs using kv::fp80 instead of concrete types such as long double, __float80, or _Float64x, future changes in the surrounding situation should require only minimal modifications.
test/test-ifp80.cc is a sample showing how to use it. It is almost the same as test-interval.cc and test-idd.cc; only the first include and the type name differ.
test/test-ddx.cc is a usage example. Including kv/ddx.hpp makes the kv::ddx type available. It is almost as easy to use as dd. Mathematical functions are also available.
test/test-iddx.cc is a sample showing how to use it.
Changing double to kv::fp80, or dd to ddx, slows things down by only about 10-20% at most, so the performance is almost unchanged. This may be useful when you need just a little more precision but MPFR is too slow to be practical.
In principle, it would be possible to implement interval arithmetic in rfp80.hpp and rddx.hpp that does not change the rounding direction at all when -DKV_NOHWROUND is specified, but this has not yet been implemented.
Starting with version 0.4.56, _Float64x began to behave abnormally with g++ version 13, so features related to _Float64x were disabled for g++ version 13 and later.
Starting with version 0.4.60, the feature that had become unavailable with g++ version 13 and later was restored by stopping the use of _Float64x and switching to long double. Since the best type to use may change again in the future, the policy is to define kv::fp80, which is currently an alias for long double, and write code using that type. Along with this change,
| Old name | New name |
|---|---|
| rfloat64x.hpp | rfp80.hpp |
| test-ifloat64x.cc | test-ifp80.cc |
| conv-float64x.hpp | conv-fp80.hpp |
several file names were changed as shown above. Since this feature was disabled for g++ 13, I assume that very few people were using it. If you were using it, please change the header files you include and rewrite your code to use kv::fp80 instead of _Float64x.