[Libclc-dev] [PATCH] Add remaining float constants

Jeroen Ketema j.ketema at imperial.ac.uk
Mon Jun 16 02:52:29 PDT 2014


---
generic/include/clc/float/definitions.h | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/generic/include/clc/float/definitions.h b/generic/include/clc/float/definitions.h
index af54fdf..0fb0edf 100644
--- a/generic/include/clc/float/definitions.h
+++ b/generic/include/clc/float/definitions.h
@@ -9,11 +9,19 @@
#define FLT_MIN         0x1.0p-126f
#define FLT_EPSILON     0x1.0p-23f

+#define M_E_F           0x1.5bf0a8p+1f
#define M_LOG2E_F       0x1.715476p+0f
#define M_LOG10E_F      0x1.bcb7b2p-2f
#define M_LN2_F         0x1.62e430p-1f
#define M_LN10_F        0x1.26bb1cp+1f
#define M_PI_F          0x1.921fb6p+1f
+#define M_PI_2_F        0x1.921fb6p+0f
+#define M_PI_4_F        0x1.921fb6p-1f
+#define M_1_PI_F        0x1.45f306p-2f
+#define M_2_PI_F        0x1.45f306p-1f
+#define M_2_SQRTPI_F    0x1.20dd76p+0f
+#define M_SQRT2_F       0x1.6a09e6p+0f
+#define M_SQRT1_2_F     0x1.6a09e6p-1f

#ifdef cl_khr_fp64

-- 
1.8.5.2 (Apple Git-48)





More information about the Libclc-dev mailing list