Skip to content

Commit

Permalink
fix fract for double and half arguments (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Apr 3, 2024
1 parent da1282c commit 82b67dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenCL_C.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5282,9 +5282,9 @@ ifdef::cl_khr_fp16[gentypeh *fmax*(gentypeh _x_, half _y_)]
{opencl_c_generic_address_space} feature:

gentype *fract*(gentype _x_, gentype _*iptr_)
// TODO The fp16 extension uses the constant `0x1.ffcp-1f` below - unclear
// why, see the OpenCL-Docs issue.
| Returns *fmin*(_x_ - *floor*(_x_), `0x1.fffffep-1f`).
| 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_.
footnote:[{fn-fract-min}]
ifdef::cl_khr_fp16[]
Expand Down

0 comments on commit 82b67dd

Please sign in to comment.