robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
7ead328a48
master
1/* Lua CJSON floating point conversion routines */ 2 3/* Buffer required to store the largest string representation of a double. 4* 5* Longest double printed with %.14g is 21 characters long: 6* -1.7976931348623e+308 */ 7# define FPCONV_G_FMT_BUFSIZE 32 8 9#ifdef USE_INTERNAL_FPCONV 10// #ifdef MULTIPLE_THREADS 11// #include "dtoa_config.h" 12// #include <unistd.h> 13// static inline void fpconv_init() 14// { 15// // Add one to try and avoid core id multiplier alignment 16// set_max_dtoa_threads((sysconf(_SC_NPROCESSORS_CONF) + 1) * 3); 17// } 18// #else 19static inline void fpconv_init () 20{ 21/* Do nothing - not required */ 22} 23// #endif 24#else 25extern void fpconv_init (void ); 26#endif 27 28extern int fpconv_g_fmt (char * ,double ,int ); 29extern double fpconv_strtod (const char * ,char ** ); 30 31/* vi:ai et sw=4 ts=4: 32*/