Skip to content

Commit

Permalink
allow numeric rounding to be 3...7
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Apr 12, 2024
1 parent a11a2e2 commit be12d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/forder.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ SEXP setNumericRounding(SEXP droundArg)
// init.c has initial call with default of 2
{
if (!isInteger(droundArg) || LENGTH(droundArg)!=1) error(_("Must an integer or numeric vector length 1"));
if (INTEGER(droundArg)[0] < 0 || INTEGER(droundArg)[0] > 2) error(_("Must be 2, 1 or 0"));
if (INTEGER(droundArg)[0] < 0 || INTEGER(droundArg)[0] > 7) error(_("Must be a number of bytes between 0 and 7"));
dround = INTEGER(droundArg)[0];
dmask = dround ? 1 << (8*dround-1) : 0;
return R_NilValue;
Expand Down

0 comments on commit be12d0f

Please sign in to comment.