lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I just have a idea that replace lua_Number as a GMP number or MAPM
> number, is that possible? I mean, A lua with native big number
> support?

I think Gavin Wraith once used MAPM in RiscLua:
	http://lua-users.org/lists/lua-l/2006-04/msg00168.html

I haven't tried this yet but it shoud be reasonably simple due to the
existence of the luai_num* macros in luaconf.h. However, I expect that
there will be some issues with memory management because Lua does not
garbage collect numbers and so you cannot tell the underlying library
to free big numbers.

Anyway, I'd like to hear about your efforts.