Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent results on different machine #19

Open
dipterix opened this issue Aug 11, 2021 · 1 comment
Open

Inconsistent results on different machine #19

dipterix opened this issue Aug 11, 2021 · 1 comment

Comments

@dipterix
Copy link

dipterix commented Aug 11, 2021

I tested bit64::as.integer64(2^63) on x86 ubuntu vs ARM M1 OSX,

# Ubuntu
> bit64::as.integer64(2^63)
integer64
[1] <NA>

# M1, OSX
> bit64::as.integer64(2^63)
integer64
[1] 9223372036854775807

I was wondering if this is expected behavior?

I tested the following script:

print_bit <- Rcpp::cppFunction(r"(
SEXP print_bit(SEXP obj){

  int64_t tmp1 = *REAL0(obj);
  printf("%lld ", tmp1);

  return(R_NilValue);
}
)")
print_bit(2^63)

On x64 ubuntu server, print_bit(2^63) prints -9223372036854775808, but on M1 mac, it prints 9223372036854775807

This was referenced Aug 11, 2021
@dipterix
Copy link
Author

hhoeflin pushed a commit to hhoeflin/hdf5r that referenced this issue Aug 14, 2021
* added github actions to check the repo

* added build ignore for gh action checks; set system path to include h5cc

* minor fix for non-osx

* updated to HDF5 1.12.1

* See #178 and r-lib/bit64#19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant