Generic eq procedure for rational,complex,natural numbers