JuliaLang/julia — pull request #3042 by tlycken (2013-05-07 07:27:24+00:00)
Title: RFC: `isapprox()` for arrays take tolerance arguments

I know this code might be moving soon (#2422), but I needed something in it so I fixed it. Basically, calling `isapprox()` on arrays to compare floating point numbers now also supports tolerance arguments (in fact, by applying the scalar version element-wise).

The new code is basically copied from the few lines just above in the file. I feel like there's a "smarter" way to do this with metaprogramming, but I couldn't get it to work. This works, at least. If anyone has suggestions on how to write it better, please feel free!