math/kamis: Improve BROKEN lines
(cherry picked from commit a1a827b846c42d7cf346ffe0c06fb6aea47ea23e)