Do the same optimisation done by rhettinger for math.floor in https://github.com/python/cpython/pull/21072 <!-- gh-linked-prs --> ### Linked PRs * gh-108801 <!-- /gh-linked-prs -->