We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using bignum I encountered that portion of numerics (99994999999991:99999999999769) are not converted correctly:
bignum
library(openssl) bignum(99994999999990) # [b] 99994999999990 # correct bignum(99994999999991) # + 1 # [b] 100000000000000 # incorrect bignum(99999999999769) # + 5e+09 # [b] 100000000000000 # incorrect bignum(99999999999770) # + 1 # [b] 99994999999990 # correct
but, if we use character, conversion is correct:
character
bignum('99994999999991') # [b] 99994999999991
Looking at undelaying code we can see that formatC is to be blamed:
formatC
formatC(99994999999991, format = "fg") # [1] "100000000000000"
Maybe this could be fixed replacing formatC with format?
format
format(99994999999991, scientific = F) # "99994999999991" format(99994999999991.11, scientific = F) # "99994999999991" # should warn? format(1.13, scientific = F) # "1.13"
Or maybe conversion from double should be turned off and the pitfalls should be described in help?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using
bignum
I encountered that portion of numerics (99994999999991:99999999999769) are not converted correctly:but, if we use
character
, conversion is correct:Looking at undelaying code we can see that
formatC
is to be blamed:Maybe this could be fixed replacing
formatC
withformat
?Or maybe conversion from double should be turned off and the pitfalls should be described in help?
The text was updated successfully, but these errors were encountered: