You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if the specification could clarify whenever it says returns 0.0 whether this means strictly +0.0 or whether -0.0 is possible?
This appears to apply to the sign, step and smoothstep builtins but admittedly I only really have sign in mind. A more efficient implementation of sign may be possible in some cases if the sign was able to be copied directly from x, in which case negative NaNs would produce -0.0.
My interpretation of sign would be that it returns +0.0 but since the documentation goes out of its way to specify a return value of +0.0 and -0.0 when x is either of those values, leaving in 0.0 without an explicit sign as an option could be misinterpreted.
The OpenCL-CTS currently passes for an implementation of sign that returns -0.0 for -NaN. I don't know if those specific input values are being tested, but either way, if -0.0 is not intended then it is currently being allowed by omission.
The text was updated successfully, but these errors were encountered:
I was wondering if the specification could clarify whenever it says
returns 0.0
whether this means strictly+0.0
or whether-0.0
is possible?This appears to apply to the
sign
,step
andsmoothstep
builtins but admittedly I only really havesign
in mind. A more efficient implementation ofsign
may be possible in some cases if the sign was able to be copied directly fromx
, in which case negative NaNs would produce-0.0
.My interpretation of
sign
would be that it returns+0.0
but since the documentation goes out of its way to specify a return value of+0.0
and-0.0
whenx
is either of those values, leaving in0.0
without an explicit sign as an option could be misinterpreted.The OpenCL-CTS currently passes for an implementation of
sign
that returns-0.0
for-NaN
. I don't know if those specific input values are being tested, but either way, if-0.0
is not intended then it is currently being allowed by omission.The text was updated successfully, but these errors were encountered: