[Libclc-dev] [PATCH] Add several missing double constant definitions

Jeroen Ketema j.ketema at imperial.ac.uk
Thu Jul 17 05:47:17 PDT 2014


LGTM.

Jeroen

On 16 Jul 2014, at 23:17, Aaron Watry <awatry at gmail.com> wrote:

> These were present in CL 1.0, just not implemented yet.
> 
> v2: Use hex values and fix commit message
> 
> Signed-off-by: Aaron Watry <awatry at gmail.com>
> CC: Jeroen Ketema <j.ketema at imperial.ac.uk>
> CC: Matt Arsenault <Matthew.Arsenault at amd.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..329b623 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             0x1.5bf0a8b145769p+1
> #define M_LOG2E         0x1.71547652b82fep+0
> +#define M_LOG10E        0x1.bcb7b1526e50ep-2
> +#define M_LN2           0x1.62e42fefa39efp-1
> +#define M_LN10          0x1.26bb1bbb55516p+1
> #define M_PI            0x1.921fb54442d18p+1
> +#define M_PI_2          0x1.921fb54442d18p+0
> +#define M_PI_4          0x1.921fb54442d18p-1
> +#define M_1_PI          0x1.45f306dc9c883p-2
> +#define M_2_PI          0x1.45f306dc9c883p-1
> +#define M_2_SQRTPI      0x1.20dd750429b6dp+0
> +#define M_SQRT2         0x1.6a09e667f3bcdp+0
> +#define M_SQRT1_2       0x1.6a09e667f3bcdp-1
> 
> #endif
> 
> -- 
> 1.9.1
> 





More information about the Libclc-dev mailing list