Commit b61f15a
Fix incorrect result for fp16
According to OpenCL C spec of `fract` function:
"Returns fmin(x - floor(x), C), where C is the constant 0x1.fffffep-1f for float aguments,
0x1.fffffffffffffp-1 for double arguments, and 0x1.ffcp-1h for half arguments. floor(x)
is returned in iptr."
Therefore `0x1.ffcp-1h` should be used for `half` version of `fract`.fract function for small negative inputs1 parent e269a93 commit b61f15a
1 file changed
+24
-24
lines changed
0 commit comments