[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Passing values by reference?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 16 Jun 2003 13:53:38 -0300
>Unfortunately one can't emulate numbers with userdata in Lua. This makes the original poster's example impossible to do with no modifications to Lua core. For whatever reasons (minimalism, simplicity and performance I would think) one can only do math on two values of the same type in Lua and type coercion is not supported.
Not true. Check out my arbitrary precision libraries (lbc and lmapm) at
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
You can freely mix arbitrary-precision numbers with ordinary Lua numbers
in the same expression.
--lhf