diff --git a/libclc/generic/lib/math/nan.inc b/libclc/generic/lib/math/nan.inc index f6508c3ab521c..7f081ff6314ef 100644 --- a/libclc/generic/lib/math/nan.inc +++ b/libclc/generic/lib/math/nan.inc @@ -5,7 +5,7 @@ #if __CLC_FPSIZE == 64 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE nan(__CLC_XCONCAT(ulong, __CLC_VECSIZE) code) { - return __CLC_AS_GENTYPE(code | 0x7ff0000000000000ul); + return __CLC_AS_GENTYPE(code | 0x7ff8000000000000ul); } #elif __CLC_FPSIZE == 32 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE nan(__CLC_XCONCAT(uint, __CLC_VECSIZE) code) diff --git a/libclc/generic/libspirv/math/nan.inc b/libclc/generic/libspirv/math/nan.inc index d778a82bca519..492db1ee94944 100644 --- a/libclc/generic/libspirv/math/nan.inc +++ b/libclc/generic/libspirv/math/nan.inc @@ -12,7 +12,7 @@ #if __CLC_FPSIZE == 64 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __spirv_ocl_nan(__CLC_XCONCAT(ulong, __CLC_VECSIZE) code) { - return __CLC_AS_GENTYPE(code | 0x7ff0000000000000ul); + return __CLC_AS_GENTYPE(code | 0x7ff8000000000000ul); } _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __spirv_ocl_nan(__CLC_XCONCAT(long, __CLC_VECSIZE) code) {