double x = 10000.0;
and x is used in an expression which yields a result not finitely representable by the given floating-point type, such as:
double y = exp(x);
Can I safely assume that under any valid OpenCL implementation (the code is designed for OpenCL 1.1) when y is not a finite number, it must be Inf (i.e., not NaN or something else), and hence the following expression always returns true (1):
Moreover, assume my y is used in an expression as argument for say fmin, such as:
double z = fmin(y * 20000.0 + 4.0, 55.0);
Can I safely assume that if isinf(y) or isinf(y * 20000.0 + 4.0) holds, then z will always be properly initialized to 55.0?
Or is there some implementation-specific door open?