- Notifications
You must be signed in to change notification settings - Fork 602
POSIX::is*** floating-point testing functions should not return NV #19325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: blead
Are you sure you want to change the base?
Conversation
C99 floating-point comparison (isgreater, isunordered, ...), classification (isinf, isfinite, ...) and signbit macros are semantically boolean functions returning int, but their corresponding XSUBs in POSIX.xs used to return NV. They now return integers, and acutually return immortal "1" when underlying C macro/functions returned nonzero value.
| Now that we have stable boolean values, should these functions not return those? |
Oh, actually looking at the code I see they do for true, but not for false. |
I have once tried to make them return Because these functions used to return numeric value for long times, I think that there might already exist perl programs which expect these functions to return |
On further thought, unlike |
C99 (and POSIX) seem to say that the |
| @ilmari is it ok to merge this with you |
| I remain of the opinion that |
| @t-a-k Please respond |
| I still think that
|
@ilmari , @khwilliamson ... could you respond to @t-a-k's comments from two years ago? Thanks. |
@ilmari, @khwilliamson could you respond to @t-a-k's comments from three years ago? Thanks. |
C99 floating-point comparison (
isgreater,isunordered, ...), classification (isinf,isfinite, ...) andsignbitmacros are semantically boolean functions returningint, but their corresponding XSUBs in POSIX.xs used to return NV.This PR will change them to return integers, and actually return immortal "1" when underlying C macro/functions returned nonzero value, because these nonzero value might be C library/compiler dependent.