[Libclc-dev] [PATCH 7/7] Add several double constant definitions from CL 1.1

Aaron Watry awatry at gmail.com
Tue Jul 15 15:24:51 PDT 2014


Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 generic/include/clc/float/definitions.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/generic/include/clc/float/definitions.h b/generic/include/clc/float/definitions.h
index 18f2cbc..9ba8e99 100644
--- a/generic/include/clc/float/definitions.h
+++ b/generic/include/clc/float/definitions.h
@@ -42,8 +42,19 @@
 #define DBL_MIN         0x1.0p-1022
 #define DBL_EPSILON     0x1.0p-52
 
+#define M_E             2.718281828459045090796
 #define M_LOG2E         0x1.71547652b82fep+0
+#define M_LOG10E        0.434294481903251816668
+#define M_LN2           0.693147180559945286227
+#define M_LN10          2.302585092994045901094
 #define M_PI            0x1.921fb54442d18p+1
+#define M_PI_2          1.570796326794896557999
+#define M_PI_4          0.785398163397448278999
+#define M_1_PI          0.318309886183790691216
+#define M_2_PI          0.636619772367581382433
+#define M_2_SQRTPI      1.128379167095512558561
+#define M_SQRT2         1.414213562373095145475
+#define M_SQRT1_2       0.707106781186547572737
 
 #endif
 
-- 
1.9.1





More information about the Libclc-dev mailing list