diff --git a/OpenCL_C.txt b/OpenCL_C.txt index e6c739ee0..0ea024b6c 100644 --- a/OpenCL_C.txt +++ b/OpenCL_C.txt @@ -1804,13 +1804,13 @@ specified by <>. When converting from a floating-point type to integer type, the behavior is implementation-defined. -Conversions to integer type may opt to convert using the optional saturated +Conversions to integer types may opt to convert using the optional saturated mode by appending the `_sat` modifier to the conversion function name. When in saturated mode, values that are outside the representable range -shall clamp to the nearest representable value in the destination format. -(NaN should be converted to 0). +are clamped to the nearest representable value in the destination format, +and NaN is converted to zero. -Conversions to floating-point type shall conform to IEEE-754 rounding rules. +Conversions to floating-point types conform to IEEE-754 rounding rules. The `_sat` modifier may not be used for conversions to floating-point formats. @@ -1824,7 +1824,7 @@ Example 1: ---------- short4 s; -// negative values clamped to 0 +// negative values clamped to zero ushort4 u = convert_ushort4_sat( s ); // values > CHAR_MAX converted to CHAR_MAX @@ -1843,7 +1843,7 @@ float4 f; int4 i = convert_int4( f ); // values > INT_MAX clamp to INT_MAX, values < INT_MIN clamp -// to INT_MIN. NaN should produce 0. +// to INT_MIN, and NaN is converted to zero // The _rtz_ rounding mode is used to produce the integer values. int4 i2 = convert_int4_sat( f ); diff --git a/man/static/convert_T.txt b/man/static/convert_T.txt index 658b8b6d9..a3bb39e36 100644 --- a/man/static/convert_T.txt +++ b/man/static/convert_T.txt @@ -139,13 +139,13 @@ specified by <>. When converting from a floating-point type to integer type, the behavior is implementation-defined. -Conversions to integer type may opt to convert using the optional saturated +Conversions to integer types may opt to convert using the optional saturated mode by appending the _sat modifier to the conversion function name. When in saturated mode, values that are outside the representable range -shall clamp to the nearest representable value in the destination format. -(NaN should be converted to 0). +are clamped to the nearest representable value in the destination format, +and NaN is converted to zero. -Conversions to floating-point type shall conform to IEEE-754 rounding rules. +Conversions to floating-point types conform to IEEE-754 rounding rules. The `_sat` modifier may not be used for conversions to floating-point formats. @@ -159,7 +159,7 @@ Example 1: ---------- short4 s; -// negative values clamped to 0 +// negative values clamped to zero ushort4 u = convert_ushort4_sat( s ); // values > CHAR_MAX converted to CHAR_MAX @@ -178,7 +178,7 @@ float4 f; int4 i = convert_int4( f ); // values > INT_MAX clamp to INT_MAX, values < INT_MIN clamp -// to INT_MIN. NaN should produce 0. +// to INT_MIN, and NaN is converted to zero // The _rtz_ rounding mode is used to produce the integer values. int4 i2 = convert_int4_sat( f );