Description

The following symbolic constants are available. Their values are of type float and are accurate within the precision of a single precision floating-point number.

Constant Name

Description

MAXFLOAT

Value of maximum non-infinite single-precision floating-point number.

HUGE_VALF

A positive float constant expression. HUGE_VALF evaluates to +infinity. Used as an error value returned by the built-in math functions.

INFINITY

A constant expression of type float representing positive or unsigned infinity.

NAN

A constant expression of type float representing a quiet NaN.

If double precision is supported by the device, the following symbolic constants will also be available:

Constant Name

Description

HUGE_VAL

A positive double constant expression. HUGE_VAL evaluates to +infinity. Used as an error value returned by the built-in math functions.

See Also

Document Notes

For more information, see the OpenCL C Specification

This page is extracted from the OpenCL C Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.