Skip to content

Commit

Permalink
[SYSTEMDS-3833] Fix seq() length primitive (apply only when violated)
Browse files Browse the repository at this point in the history
  • Loading branch information
mboehm7 committed Feb 9, 2025
1 parent 417bf3e commit 775d06a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ public static long getSeqLength(double from, double to, double incr, boolean che
else
return 0; // invalid loop configuration
}
long tmp = 1L + (long) Math.floor(to/incr - from/incr);
return tmp + ((from+tmp*incr <= to) ? 1 : 0);
long tmp = (long) Math.floor(to/incr - from/incr);
return 1L + tmp + ((from+tmp*incr < to) ? 1 : 0);
}

/**
Expand Down

0 comments on commit 775d06a

Please sign in to comment.