Handle boundary and illegal values.
Handle boundary and illegal values.

Such as |x| = 1.0, |x| < 2**-27 and |x| > 1.

v2. Replace some constant variable with existing macro value.

Signed-off-by: Yi Sun <a7ab858552be010621b3b5c596bf4feb1309fb3c@intel.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>

ignatenkobrain/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,wdv4758h/beignet,ignatenkobrain/beignet,freedesktop-unofficial-mirror/beignet,ignatenkobrain/beignet,zhenyw/beignet,zhenyw/beignet,ignatenkobrain/beignet,zhenyw/beignet,wdv4758h/beignet,wdv4758h/beignet,freedesktop-unofficial-mirror/beignet,wdv4758h/beignet,freedesktop-unofficial-mirror/beignet,zhenyw/beignet,ignatenkobrain/beignet,wdv4758h/beignet