Skip to content

Commit f52f024

Browse files
committed
Fixed problems which caused error to exceed the designed limit in rare cases.
1 parent fc0516c commit f52f024

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libm/sleefsimddp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,15 +2000,15 @@ EXPORT CONST vdouble xexp2(vdouble d) {
20002000
u = vmla_vd_vd_vd_vd(u, s2, vcast_vd_d(+0.1525273353517584730e-4));
20012001
u = vmla_vd_vd_vd_vd(u, s2, vcast_vd_d(+0.1333355814670499073e-2));
20022002
u = vmla_vd_vd_vd_vd(u, s2, vcast_vd_d(+0.5550410866482046596e-1));
2003-
u = vmla_vd_vd_vd_vd(u, s2, vcast_vd_d(+0.6931471805599452862e+0));
20042003

20052004
v = vcast_vd_d(+0.7073164598085707425e-8);
20062005
v = vmla_vd_vd_vd_vd(v, s2, vcast_vd_d(+0.1321543872511327615e-5));
20072006
v = vmla_vd_vd_vd_vd(v, s2, vcast_vd_d(+0.1540353045101147808e-3));
20082007
v = vmla_vd_vd_vd_vd(v, s2, vcast_vd_d(+0.9618129107597600536e-2));
20092008
v = vmla_vd_vd_vd_vd(v, s2, vcast_vd_d(+0.2402265069591012214e+0));
20102009

2011-
u = vmla_vd_vd_vd_vd(v, s, u);
2010+
u = vmla_vd_vd_vd_vd(u, s, v);
2011+
u = vmla_vd_vd_vd_vd(u, s, vcast_vd_d(+0.6931471805599452862e+0));
20122012
#else
20132013
u = vcast_vd_d(+0.4434359082926529454e-9);
20142014
u = vmla_vd_vd_vd_vd(u, s, vcast_vd_d(+0.7073164598085707425e-8));

src/libm/sleefsimdsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ static INLINE CONST vfloat2 atan2kf_u1(vfloat2 y, vfloat2 x) {
968968

969969
t = dfmul_vf2_vf2_vf2(t, dfadd_vf2_vf_vf(vcast_vf_f(-0.333332866430282592773438f), vmul_vf_vf_vf(u, t.x)));
970970
t = dfmul_vf2_vf2_vf2(s, dfadd_vf2_vf_vf2(vcast_vf_f(1), t));
971-
t = dfadd2_vf2_vf2_vf2(dfmul_vf2_vf2_vf(vcast_vf2_f_f(1.5707963705062866211f, -4.3711388286737928865e-08f), vcast_vf_vi2(q)), t);
971+
t = dfadd_vf2_vf2_vf2(dfmul_vf2_vf2_vf(vcast_vf2_f_f(1.5707963705062866211f, -4.3711388286737928865e-08f), vcast_vf_vi2(q)), t);
972972

973973
return t;
974974
}

0 commit comments

Comments
 (0)