num_equal(2, sqrt(2)^2)
# Recycling:
num_equal(c(2, 3), c(sqrt(2)^2, sqrt(3)^2, 4/2, 9/3))
# Contrast:
.1 == .3/3
num_equal(.1, .3/3)
# Contrast:
v <- c(.9 - .8, .8 - .7, .7 - .6, .6 - .5,
.5 - .4, .4 - .3, .3 - .2, .2 -.1, .1)
unique(v)
.1 == v
num_equal(.1, v)
Run the code above in your browser using DataLab