# How to make the computer consider two numbers equal up to a certain precision

My problem is that I have a matrix A and the computer says is not Hermitian (self-adjoint). Then I check which elements make A be not Hermitian by calculating:

B=A-ConjugateTranspose[A]

In case A is Hermitian, this difference should be zero. What I get is that A is not Hermitian, but the terms I get in matrix B all are smaller than 10^(-15).

So how can I fix it at the beggining of the code, Mathematica to consider two numbers equal, up to 10^(-10) precision for example, that is it to consider:

0.00000000010 = 0.00000000012

or saying it in an alternative way, I want Mathematica to consider the following matrix Hermitian:

C={{0,I*1.1^(-10)},{-I*1.2^(-10),0}}

throughout the whole code.

• You can force it to consider c Hermetian by instead using cHerm=1/2(c + ConjugateTranspose[c]) – bill s Oct 30 '13 at 18:00

There are two undocumented functions which control the tolerance of Equal and SameQ: Internal$EqualTolerance and Internal$SameQTolerance. I refer you to this answer of mine for further information.