modf
modf
2007-2011 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
3
modf Decompose a floating-point number.

##

gentype `modf` gentypex __global gentype*iptr gentype `modf` gentypex __local gentype*iptr gentype `modf` gentypex __private gentype*iptr

## Description

Decompose a floating-point number. The `modf` function breaks the argument `x` into integral and fractional parts, each of which has the same sign as the argument. It stores the integral part in the object pointed to by `iptr`.

## Notes

`modf` behaves as though implemented by:

              gentype modf ( gentype value, gentype *iptr )
              {
                        *iptr = trunc( value );
                        return copysign( isinf( value ) ? 0.0 : value -  *iptr, value );
              }

&mathFunctionsInc;

## Specification

OpenCL Specification

## Also see

Math Functions

##