On 21/08/2022 21:30, Daniel Wolfe wrote:

I have a fork on Github that adds functions named `floor_div` and
`floor_mod` which implement the floor technique. Before I submit a pull
request and write up an RFC, what are your thoughts or concerns about
adding this to PHP?


Could you give some quick examples of when these functions would give different answers, and why someone might need / want the "floor" variants?

I clicked through to the Python History article, and Guido gives the example of taking a timestamp module 86400, and says that with the "truncation" technique it gives "a meaningless result", but doesn't actually illustrate that result, so I'm struggling to picture exactly what each algorithm does.

Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to