An algorithm for solving the absolute value equation

Presented is an algorithm which for each A,B ∈ Rn×n and b ∈ Rn in a finite number of steps either finds a solution of the equation Ax+B|x| = b, or states existence of a singular matrix S satisfying |S − A |≤| B| (and in most cases also constructs such an S).