Compare numbers at the stated precision

well … then @steveng’sj solution is right for you, in the absence of a library solution?

maybe something like that if it were available working would be closer to your expectations?

Base.isapprox(x::Number, y::Number, sigdigits:: Bool) = 
if sigdigits
# here the expressions you used in 
# sigdigs
# and
# aresame
   return isapprox(x, y, atol = .49*0.1^(tol_digits))`
end