Skip to content

Commit

Permalink
fix fract for double and half arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Apr 3, 2024
1 parent 88c23e4 commit 12748a0
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-1f` for `half` arguments.
*floor*(x) is returned in _iptr_.
footnote:[{fn-fract-min}]
ifdef::cl_khr_fp16[]
Expand Down

0 comments on commit 12748a0

Please sign in to comment.