aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AVX512
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2021-01-18 13:25:16 +0000
committerGravatar David Tellenbach <david.tellenbach@me.com>2021-01-18 13:25:16 +0000
commitcdd8fdc32e730d5a65796a791ff13a92815c59b9 (patch)
tree3ee2ebf6295a44518d55ee3f6d9e26f4ca0a8a79 /Eigen/src/Core/arch/AVX512
parentbde6741641b7c677d901cd48db844fcea1fd32fe (diff)
Vectorize `pow(x, y)`. This closes https://gitlab.com/libeigen/eigen/-/issues/2085, which also contains a description of the algorithm.
I ran some testing (comparing to `std::pow(double(x), double(y)))` for `x` in the set of all (positive) floats in the interval `[std::sqrt(std::numeric_limits<float>::min()), std::sqrt(std::numeric_limits<float>::max())]`, and `y` in `{2, sqrt(2), -sqrt(2)}` I get the following error statistics: ``` max_rel_error = 8.34405e-07 rms_rel_error = 2.76654e-07 ``` If I widen the range to all normal float I see lower accuracy for arguments where the result is subnormal, e.g. for `y = sqrt(2)`: ``` max_rel_error = 0.666667 rms = 6.8727e-05 count = 1335165689 argmax = 2.56049e-32, 2.10195e-45 != 1.4013e-45 ``` which seems reasonable, since these results are subnormals with only couple of significant bits left.
Diffstat (limited to 'Eigen/src/Core/arch/AVX512')
-rw-r--r--Eigen/src/Core/arch/AVX512/PacketMath.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/arch/AVX512/PacketMath.h b/Eigen/src/Core/arch/AVX512/PacketMath.h
index f8388579b..fa43d8809 100644
--- a/Eigen/src/Core/arch/AVX512/PacketMath.h
+++ b/Eigen/src/Core/arch/AVX512/PacketMath.h
@@ -88,7 +88,7 @@ struct packet_traits<half> : default_packet_traits {
HasCeil = 1,
HasRint = 1,
HasBessel = 1,
- HasNdtri = 1,
+ HasNdtri = 1
};
};