Shubham Gupta
Shubham Gupta

Reputation: 660

The `%in%` operation is not correct for integer64

The %in% operator is not providing correct output for integer64

x <- bit64::as.integer64("9219348897572232380")
y <- bit64::as.integer64("9221407835133917342")
x == y
# FALSE
x %in% y
# TRUE

Upvotes: 2

Views: 62

Answers (1)

Shubham Gupta
Shubham Gupta

Reputation: 660

The issue was that I didn't call the library(bit64), hence, bit64 specific %in% wasn't dispatched. Thanks @akrun

library(bit64)
x <- bit64::as.integer64("9219348897572232380")
y <- bit64::as.integer64("9221407835133917342")
x == y
# FALSE
x %in% y
# FALSE

Upvotes: 2

Related Questions