Skip to content
Snippets Groups Projects
Commit 89aa8fc2 authored by Pranay Gupta's avatar Pranay Gupta
Browse files

support for double precision added, errmsg on wild precision values

parent aa659330
No related branches found
No related tags found
No related merge requests found
...@@ -89,9 +89,19 @@ typedef unsigned __int64 uint64_t; ...@@ -89,9 +89,19 @@ typedef unsigned __int64 uint64_t;
#if !defined(PD_LONGINTTYPE) #if !defined(PD_LONGINTTYPE)
#define PD_LONGINTTYPE long #define PD_LONGINTTYPE long
#endif #endif
#if !defined(PD_FLOATTYPE)
#if !defined(PD_FLOAT_PRECISION)
#define PD_FLOAT_PRECISION 32 /* 32 for single precision or 64 for double precision */
#endif
#if PD_FLOAT_PRECISION == 32
#define PD_FLOATTYPE float #define PD_FLOATTYPE float
#elif PD_FLOAT_PRECISION == 64
#define PD_FLOATTYPE double
#else
#error invalid PD_FLOATPRECISION: must be 32 or 64
#endif #endif
typedef PD_LONGINTTYPE t_int; /* pointer-size integer */ typedef PD_LONGINTTYPE t_int; /* pointer-size integer */
typedef PD_FLOATTYPE t_float; /* a float type at most the same size */ typedef PD_FLOATTYPE t_float; /* a float type at most the same size */
typedef PD_FLOATTYPE t_floatarg; /* float type for function calls */ typedef PD_FLOATTYPE t_floatarg; /* float type for function calls */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment