[eigen-commits] commit/eigen: rmlarsen: 1. Fix a bug in psqrt and make it return 0 for +inf arguments. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen-commits Archives
]
- To: eigen-commits@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen-commits] commit/eigen: rmlarsen: 1. Fix a bug in psqrt and make it return 0 for +inf arguments.
- From: Bitbucket <commits-noreply@xxxxxxxxxxxxx>
- Date: Sat, 16 Nov 2019 01:11:50 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bitbucket.org; h=content-type:mime-version:content-transfer-encoding:subject:from:to; s=s1; bh=sKZOCXhLlRoloaXKRl8siPSGt2pwILrVwqCmIcwe9Kk=; b=qY1jUwq mgm4neRw94jyh7zFYB+ASZNUQ354qfhgdbYMXXDtivgrRO6XRM+ya10J2vU9OPca nIOJiao3oBecfCdPzTqrn1qfjZ0O1hq2SjwkXc7BMvhfGmWQt2X8B/lqkmhGT2AW KfCwxe+igCoeykKMCQPfGDSIiQf02Ct50WfE=
1 new commit in eigen:
https://bitbucket.org/eigen/eigen/commits/66be6c76fc01/
Changeset: 66be6c76fc01
User: rmlarsen
Date: 2019-11-16 01:09:46+00:00
Summary: 1. Fix a bug in psqrt and make it return 0 for +inf arguments.
2. Simplify handling of special cases by taking advantage of the fact that the
builtin vrsqrt approximation handles negative, zero and +inf arguments correctly.
This speeds up the SSE and AVX implementations by ~20%.
3. Make the Newton-Raphson formula used for rsqrt more numerically robust:
Before: y = y * (1.5 - x/2 * y^2)
After: y = y * (1.5 - y * (x/2) * y)
Forming y^2 can overflow for very large or very small (denormalized) values of x, while x*y ~= 1. For AVX512, this makes it possible to compute accurate results for denormal inputs down to ~1e-42 in single precision.
4. Add a faster double precision implementation for Knights Landing using the vrsqrt28 instruction and a single Newton-Raphson iteration.
Benchmark results: https://bitbucket.org/snippets/rmlarsen/5LBq9o
Affected #: 4 files
Repository URL: https://bitbucket.org/eigen/eigen/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.