| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good, but we don't have similar checks for other predicates, e.g. isfinite(). That's why I don't sure we should add such checks.
But it's up to you. BTW, probably you can remove comments - we have documentation, right?
Sorry, something went wrong.
Oh! Ok makes sense. Let's not burden the already existing tests. I've added it in signbit because signbit may return the corresponding power-of-two if there is a sign bit. But I think it's the only one that is not named "isXXX()" and that returns a boolean.
Right. I actually wanted to add a comment in the tests in case we change the return value for some reason (it could serve as a regression test as well). I don't want to burden the online docs with those implementation details (in C++ for instance, it's a boolean that is returned, so depending on the page of cppreference you land, you may be like "why are they explaining this?"). Sorry for the noise! I'll keep the check in the signbit PR because of the lack of the is prefix but won't merge this one. |
Sorry, something went wrong.
|
@skirpichev Btw, do you remember if we have an issue about positional-only arguments in math.* ? all functions are positional-only but I don't remember what we decided. |
Sorry, something went wrong.
@picnixz, I'm not sure we have an issue about this. Perhaps, you are about this pr: #131886 ? In similar way we could change signatures in the math module. The cost is a small regression in processing arguments. (Perhaps, it could be solved.) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I've actually stumbled upon the isnormal() C11 requirements (which I assume are the same as issubnormal() ones but I don't have a C23 copy) and I think we can add those checks (I first thought about returning the integer value given by signbit but in C++, it returns a bool instead of just an integer [on some implementations it gives the power of 2 representing the sign bit].