playing with floor and ceil , extended euclidean