Re: [PHP-DEV] [RFC] clamp

2021-07-03 Thread Kim Hallberg
> On 28 Jun 2021, at 11:16 AM, Nikita Popov wrote: > > The RFC is missing a precise description of how this function works with NaN > and negative zero. The expected behavior is that if min or max are NaN, an > exception is thrown, if num if NaN then NaN is returned, and the behavior wrt >

Re: [PHP-DEV] [RFC] clamp

2021-07-03 Thread Kim Hallberg
> On 24 Jun 2021, at 1:50 AM, tyson andre wrote: > > So I think the major objections are that: > > 1. This is easy to implement in userland and there's negligible performance > benefit > (in code that is a performance sensitive loop, it may still be worse > compared to `$num < $min ? $min :

Re: [PHP-DEV] [RFC] clamp

2021-06-28 Thread Nikita Popov
On Wed, Jun 23, 2021 at 8:43 PM Kim Hallberg wrote: > Hello internals, > > The RFC for the clamp function is now open and under discussion, you now > have 2 weeks > to discuss, suggest improvements and open issues before voting is > considered. > > Any and all feedback is welcomed. > > The RFC

Re: [PHP-DEV] [RFC] clamp

2021-06-24 Thread Bob Magic
why stop with clamp? add wrap too. imagine being against clamp but ok with floor and ceiling. lets make our math lib even better.

Re: [PHP-DEV] [RFC] clamp

2021-06-24 Thread Mike Schinkel
> On Jun 24, 2021, at 7:59 AM, Pierre wrote: > > Le 24/06/2021 à 11:44, Michał Marcin Brzuchalski a écrit : >> I get an impression that we constantly add things into standard library >> which are from a language perspective irrelevant >> and that all could be developed in userland with no

Re: [PHP-DEV] [RFC] clamp

2021-06-24 Thread Pierre
Le 24/06/2021 à 11:44, Michał Marcin Brzuchalski a écrit : I get an impression that we constantly add things into standard library which are from a language perspective irrelevant and that all could be developed in userland with no harm. Cheers, -- Michał Marcin Brzuchalski Hello, I

Re: [PHP-DEV] [RFC] clamp

2021-06-24 Thread Michał Marcin Brzuchalski
czw., 24 cze 2021 o 02:15 tyson andre napisał(a): > Hello Kim Hallberg, > > > The RFC for the clamp function is now open and under discussion, you now > have 2 weeks > > to discuss, suggest improvements and open issues before voting is > considered. > > > From https://wiki.php.net/rfc/clamp - >

Re: [PHP-DEV] [RFC] clamp

2021-06-23 Thread tyson andre
Hello Kim Hallberg, > The RFC for the clamp function is now open and under discussion, you now have > 2 weeks > to discuss, suggest improvements and open issues before voting is considered. >From https://wiki.php.net/rfc/clamp - > Current userland implementations are handled in several

Re: [PHP-DEV] [RFC] clamp

2021-06-23 Thread tyson andre
Hi Kim Hallberg, > The RFC for the clamp function is now open and under discussion, you now have > 2 weeks > to discuss, suggest improvements and open issues before voting is considered. > > Any and all feedback is welcomed. > > The RFC is available for viewing here:

[PHP-DEV] [RFC] clamp

2021-06-23 Thread Kim Hallberg
Hello internals, The RFC for the clamp function is now open and under discussion, you now have 2 weeks to discuss, suggest improvements and open issues before voting is considered. Any and all feedback is welcomed. The RFC is available for viewing here: https://wiki.php.net/rfc/clamp