Skip to content

Commit

Permalink
Detect NaN in +/@:*"1!.1
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHRich committed Nov 3, 2024
1 parent 99281cc commit 12f7251
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jsrc/va2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ DF2(jtsumattymes1){
}
}
#endif
if(unlikely(NANTEST)){ASSERT(fit=1,EVNAN) RETF(jtsumattymes1(jt,a,w,FAV(self)->fgh[0]))} // !.1 cannot recover from NaN (which can come from infinities). Revert !.0 to uncompensated case
if(unlikely(NANTEST)){ASSERT(fit==1,EVNAN) RETF(jtsumattymes1(jt,a,w,FAV(self)->fgh[0]))} // !.1 cannot recover from NaN (which can come from infinities). Revert !.0 to uncompensated case
}
RETF(z);
}
Expand Down
1 change: 1 addition & 0 deletions test/g520.ijs
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ f =: 1:`({{

f i. 65

'NaN error' -: _ _ _ +/@:*"1!.1 etx (0 0 0)


NB. {y ------------------------------------------------------------------
Expand Down

0 comments on commit 12f7251

Please sign in to comment.