[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LuaCSP framework: Communicating Sequential Processes in Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 15 Jan 2013 17:24:18 -0200
> I have sent you the files.
Thanks. I've been able to compile Lua 5.2.1 with float as numbers with the
changes below. It compiles with no warnings under
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 with -Wall -Wextra
% diff luaconf.h,orig luaconf.h
386,387c386
< #define LUA_NUMBER_DOUBLE
< #define LUA_NUMBER double
---
> #define LUA_NUMBER float
402,403c401,402
< #define LUA_NUMBER_SCAN "%lf"
< #define LUA_NUMBER_FMT "%.14g"
---
> #define LUA_NUMBER_SCAN "%f"
> #define LUA_NUMBER_FMT "%.7g"
416c415
< #define lua_str2number(s,p) strtod((s), (p))
---
> #define lua_str2number(s,p) strtof((s), (p))
419c418
< #define lua_strx2number(s,p) strtod((s), (p))
---
> #define lua_strx2number(s,p) strtof((s), (p))
430,431c429,430
< #define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b))
< #define luai_numpow(L,a,b) (pow(a,b))
---
> #define luai_nummod(L,a,b) ((a) - floorf((a)/(b))*(b))
> #define luai_numpow(L,a,b) (powf(a,b))
446a446,449
> #if defined(lmathlib_c)
> #define l_tg(x) x##f
> #endif
>