Skip to content
Prev 383168 / 398502 Next

nearest lower and higher integers to a multiple of another integer

Hi Stefano,

maybe floor(x / n) * n and ceiling(x / n) * n does what you want?

  Best regards  --  Gerrit

---------------------------------------------------------------------
Dr. Gerrit Eichner                   Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de   Justus-Liebig-University Giessen
Tel: +49-(0)641-99-32104          Arndtstr. 2, 35392 Giessen, Germany
http://www.uni-giessen.de/eichner
---------------------------------------------------------------------

Am 06.04.2020 um 10:29 schrieb Stefano Sofia: