Fix rint for SSE/NEON.

It seems *sometimes* with aggressive optimizations the combination
`psub(padd(a, b), b)` trick to force rounding is compiled away. Here
we replace with inline assembly to prevent this (I tried `volatile`,
but that leads to additional loads from memory).

Also fixed an edge case for large inputs `a` where adding `b` bumps
the value up a power of two and ends up rounding away more than
just the fractional part.  If we are over `2^digits` then just return
the input.  This edge case was missed in the test since the test was
comparing approximate equality, which was still satisfied.  Adding
a strict equality option catches it.
4 files changed
tree: bdc7a7bd7f8fa13a65bd71897282bcc4e3bc87d5
  1. bench/
  2. blas/
  3. ci/
  4. cmake/
  5. debug/
  6. demos/
  7. doc/
  8. Eigen/
  9. failtest/
  10. lapack/
  11. scripts/
  12. test/
  13. unsupported/
  14. .gitignore
  15. .gitlab-ci.yml
  16. .hgeol
  17. CMakeLists.txt
  18. COPYING.APACHE
  19. COPYING.BSD
  20. COPYING.GPL
  21. COPYING.LGPL
  22. COPYING.MINPACK
  23. COPYING.MPL2
  24. COPYING.README
  25. CTestConfig.cmake
  26. CTestCustom.cmake.in
  27. eigen3.pc.in
  28. INSTALL
  29. README.md
  30. signature_of_eigen3_matrix_library
README.md

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

For more information go to http://eigen.tuxfamily.org/.

For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.