Skip to content

Commit

Permalink
Updated news.
Browse files Browse the repository at this point in the history
  • Loading branch information
NicChr committed Sep 19, 2024
1 parent 8dc7e14 commit 3d17697
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cheapr (Development version)

* Limited support added for 'integer64' objects when counting and
finding `NA` values.
* Limited support added for 'integer64' objects. This applies to the
`NA` related functions as well as the GCD and LCM functions.

* New functions `new_df` and `named_dots`.

Expand Down
3 changes: 3 additions & 0 deletions src/gcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ long long int cpp_lcm2_int64(long long int x, long long int y, bool na_rm){
// 64-bit integer overflow check
// Make sure not to divide by zero!

// res can be an int because the gcd ensures the denom
// divides x by a whole number

long long res = std::llabs(x) / cpp_gcd2_int64(x, y, false);
if (y != 0 && (std::llabs(res) > (LLONG_MAX / std::llabs(y)))){
Rf_error("64-bit integer overflow, please use doubles");
Expand Down

0 comments on commit 3d17697

Please sign in to comment.