Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit fba2d8d

Browse files
committed
fix bug 475: .exp() now returns +inf when overflow occurs (SSE)
(transplanted from dbd64aae279527f558021ce98c0950402443d460) --HG-- branch : 3.0 extra : transplant_source : %DB%D6J%AE%27%95%27%F5X%02%1C%E9%8C%09P%40%24C%D4%60
1 parent 4cadb7d commit fba2d8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Eigen/src/Core/arch/SSE/MathFunctions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Packet4f pexp<Packet4f>(const Packet4f& _x)
121121
_EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f);
122122

123123

124-
_EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647949f);
124+
_EIGEN_DECLARE_CONST_Packet4f(exp_hi, 88.3762626647950f);
125125
_EIGEN_DECLARE_CONST_Packet4f(exp_lo, -88.3762626647949f);
126126

127127
_EIGEN_DECLARE_CONST_Packet4f(cephes_LOG2EF, 1.44269504088896341f);
@@ -168,7 +168,7 @@ Packet4f pexp<Packet4f>(const Packet4f& _x)
168168
y = pmadd(y, z, x);
169169
y = padd(y, p4f_1);
170170

171-
/* build 2^n */
171+
// build 2^n
172172
emm0 = _mm_cvttps_epi32(fx);
173173
emm0 = _mm_add_epi32(emm0, p4i_0x7f);
174174
emm0 = _mm_slli_epi32(emm0, 23);

0 commit comments

Comments
 (0)