Skip to content

Commit 82b67dd

Browse files
authored
fix fract for double and half arguments (#1136)
1 parent da1282c commit 82b67dd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

OpenCL_C.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,9 +5282,9 @@ ifdef::cl_khr_fp16[gentypeh *fmax*(gentypeh _x_, half _y_)]
52825282
{opencl_c_generic_address_space} feature:
52835283

52845284
gentype *fract*(gentype _x_, gentype _*iptr_)
5285-
// TODO The fp16 extension uses the constant `0x1.ffcp-1f` below - unclear
5286-
// why, see the OpenCL-Docs issue.
5287-
| Returns *fmin*(_x_ - *floor*(_x_), `0x1.fffffep-1f`).
5285+
| Returns *fmin*(_x_ - *floor*(_x_), `C`), where `C` is the constant
5286+
`0x1.fffffep-1f` for `float` aguments, `0x1.fffffffffffffp-1` for `double`
5287+
arguments, and `0x1.ffcp-1h` for `half` arguments.
52885288
*floor*(x) is returned in _iptr_.
52895289
footnote:[{fn-fract-min}]
52905290
ifdef::cl_khr_fp16[]

0 commit comments

Comments
 (0)