Revert "if lcm is undefined for zero, tests in this case must be avoided"
lcm is defined for 0 in some mathematical tools and libraries, and the implementation from the previous commit supports it

This reverts commit 1540e5ea97be4753d267b962c23ef0aef365385c.