Hello all,
I'm working towards implementing regression, which first requires having some working linear algebra functions, so I'm writing tests for the linearalgebra.js section (and have discovered a couple very minor bugs along the way).
However, I need a way to test deep-approximate equality. E.G, the matrix [[1, 2], [3, 4]] has inverse [[-2, 1], [1.5, -0.5]], but because FP math is hard the function returns [[-1.9999999, 1], [1.499999, -0.49999999]], so assert.deepEqual() fails.
I can write a deepTol() function fairly easily, but I want to check - does this already exist somewhere in vows or the like? (I am not an expert on vows). And assuming I should just write a deepTol(), where should it go?
Cheers,
James