library(Matrix)
A <- matrix(c(3, 0, 0, 5, 1, -1, -2, 2, 4), ncol = 3, nrow = 3, byrow = T)
d <- as.integer(det(A))
p <- as.integer(prod(eigen(A)$values))
d == p
[1] FALSE
When I run the class function they both are 'numeric' and both equal 18. Yet R says that they are not equal. What's going on?