[Libclc-dev] [PATCH] Add definition for M_PI_F

Matt Arsenault Matthew.Arsenault at amd.com
Fri Mar 7 11:03:15 PST 2014


On 03/07/2014 10:56 AM, Tom Stellard wrote:
> ---
>   generic/include/clc/float/definitions.h | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/generic/include/clc/float/definitions.h b/generic/include/clc/float/definitions.h
> index e6ef1d8..b6d8a17 100644
> --- a/generic/include/clc/float/definitions.h
> +++ b/generic/include/clc/float/definitions.h
> @@ -9,6 +9,8 @@
>   #define FLT_MIN 	0x1.0p-126f
>   #define FLT_EPSILON 	0x1.0p-23f
>   
> +#define M_PI_F 3.141593f
> +
>   #ifdef cl_khr_fp64
>   
>   #define DBL_DIG 	15

I think it needs more digits. It might be best to use M_PI casted to float.





More information about the Libclc-dev mailing list