lua-users home
lua-l archive

Search lua-l

This index contains 143,604 documents and 1,774,497 keywords. Last update on 2023-03-08 .

Query: [How to search]

Display: Description: Sort by:

Results:

References: [ fixed: 3893 ] [ point: 15188 ]

Total 640 documents matching your query.

1. Re: Fixed-point LUA_NUMBER (score: 320)
Author: Asko Kauppi <askok@...>
Date: Tue, 16 Oct 2007 13:40:51 +0300
Isn't fixed point code just using int32/64, and making input/output of numbers seem they're fractional? Like 1000 -> 1.0 or just 1. As to your question, if you're in charge of all the modules, and th
2. modifying lua for table indexing with fixed point variables (score: 310)
Author: "Gregory Lamoureux" <greg.m.lamoureux@...>
Date: Fri, 25 Apr 2008 19:22:16 -0400
Hello, I've modified Lua to work using only fixed point 32 bit integers. ie, any number entered in a script or interpreter is automatically intercepted and converted to fixed point values (1e10 -> 65
3. Re: modifying lua for table indexing with fixed point variables (score: 308)
Author: "Gregory Lamoureux" <greg.m.lamoureux@...>
Date: Mon, 28 Apr 2008 13:26:11 -0400
The system that this version of Lua is intended for doesn't support floating point math at all, but I need to support enough precision to interface with OpenGL, so I think it's easier to just limit t
4. RE: Fixed-point LUA_NUMBER (score: 307)
Author: "Daniel Collins" <dcplus@...>
Date: Wed, 17 Oct 2007 11:34:34 +1000
In fact, looking back at the source code for that ARM project it seems I used Asko's integer optimisation patch and then used an explicit fixed point user data module. This did mean that initialisin
5. Re: Fixed-point LUA_NUMBER (score: 305)
Author: Asko Kauppi <askok@...>
Date: Thu, 18 Oct 2007 08:56:46 +0300
May I ask, what exactly with the automatic conversions did you dislike? Is it just a matter of trust (do they _really_ work right), a potential performance issue or something else? -asko Ariel Manzur
6. Re: Fixed-point LUA_NUMBER (score: 305)
Author: "Ariel Manzur" <puntob@...>
Date: Wed, 17 Oct 2007 20:00:32 -0300
We were in a similar situation last year, we ended up defining the lua_Number as int and added a new basic type, 'lua_Float' (in our case it was implemented as an actual float, but it could have been
7. RE: modifying lua for table indexing with fixed point variables (score: 302)
Author: "Jerome Vuarand" <jerome.vuarand@...>
Date: Mon, 28 Apr 2008 11:24:47 -0400
Shouldn't you instead modify the table construction code so that {"one","two","three","four","five"} use indices 1<<16, 2<<16, 3<<16, 4<<16 and 5<<16 ? That would solve any indexing issue. You would
8. Re: modifying lua for table indexing with fixed point variables (score: 297)
Author: Ralph Hempel <rhempel@...>
Date: Mon, 28 Apr 2008 12:01:26 -0400
I've modified Lua to work using only fixed point 32 bit integers. ie, any number entered in a script or interpreter is automatically intercepted and converted to fixed point values (1e10 -> 655360, t
9. RE: Fixed-point LUA_NUMBER (score: 297)
Author: "Daniel Collins" <dcplus@...>
Date: Tue, 16 Oct 2007 20:22:02 +1000
Last year when I was using Lua on an ARM mobile phone (no FPU) I had much the same decision to make. In the end I ended up defining LUA_NUMBER as int and making a user data module for fixed point ope
10. Re: Fixed-point LUA_NUMBER (score: 297)
Author: Enrico Colombini <erix@...>
Date: Tue, 16 Oct 2007 11:29:56 +0200
Yes, that's to be expected. The C API would be problematic; unless you keep 'lua_Number' as a familiar double and only do the conversion within the core. This would be problem #1. Could you be more s
11. Re: Fixed-point LUA_NUMBER (score: 297)
Author: Asko Kauppi <askok@...>
Date: Tue, 16 Oct 2007 12:12:04 +0300
Depends on your need of maths, since things s.a. sin, cos et.al. will lose their usefulness pretty immediately. I would actually leave such undefined for a fixed-point Lua implementation. The C API w
12. Re: Fixed-point LUA_NUMBER (score: 288)
Author: Javier Guerra Giraldez <javier@...>
Date: Tue, 16 Oct 2007 08:29:14 -0500
for addition/substraction it's enough; but if 1000 stands for 1.0, then 1.0*1.0 would give you 1000.0! (1000*1000=1000000 => 1000.0) so, most fixed-point libraries do continuous rescaling for simple
13. Re: Fixed-point LUA_NUMBER (score: 288)
Author: Asko Kauppi <askok@...>
Date: Tue, 16 Oct 2007 13:41:55 +0300
It's always worked. At least with Lua 5. But this is exactly why I did the Number patch, to avoid such hacks.... ! ;D Enrico Colombini kirjoitti 16.10.2007 kello 13:36: Daniel Collins wrote: Last yea
14. Re: Fixed-point LUA_NUMBER (score: 288)
Author: Enrico Colombini <erix@...>
Date: Tue, 16 Oct 2007 12:36:25 +0200
Daniel Collins wrote: Last year when I was using Lua on an ARM mobile phone (no FPU) I had much the same decision to make. In the end I ended up defining LUA_NUMBER as int and making a user data modu
15. Re: modifying lua for table indexing with fixed point variables (score: 283)
Author: "Gregory Lamoureux" <greg.m.lamoureux@...>
Date: Mon, 28 Apr 2008 15:50:10 -0400
a port to a platform based on ARM architecture chips with only software support for floating point. I tried various shifts to have my cake (32-bit integers for standard integers) and eat it (also hav
16. Fixed-point LUA_NUMBER (score: 279)
Author: Enrico Colombini <erix@...>
Date: Tue, 16 Oct 2007 09:49:12 +0200
What sort of traps could I fall into if I redefine LUA_NUMBER to use a fixed-point type behaving as a float? (the highest integer value for this type would be much smaller than an int's) Enrico
17. Re: modifying lua for table indexing with fixed point variables (score: 274)
Author: Gavin Wraith <gavin@...>
Date: Mon, 28 Apr 2008 19:21:38 +0100
I had a similar experience with RiscLua ( http://lua.riscos.org.uk/ ), a port to a platform based on ARM architecture chips with only software support for floating point. I tried various shifts to ha
18. Re: Fixed-point LUA_NUMBER (score: 271)
Author: Enrico Colombini <erix@...>
Date: Wed, 17 Oct 2007 08:35:08 +0200
Many thanks to all for the useful clarifications; it's a bit less foggy now :-) Enrico
19. Re: LPEG > 0.10 regression: 'B' (pattern may not have fixed length) (score: 197)
Author: Daurnimator <quae@...>
Date: Sun, 17 Apr 2016 04:51:56 +1000
btw, I just had this lpeg.B issue come up in a totally separate context. I was updating lunamark to work with 5.3, and wrote this: https://github.com/jgm/lunamark/pull/14/commits/51756bfca858795a423f
20. Re: LPEG > 0.10 regression: 'B' (pattern may not have fixed length) (score: 192)
Author: Roberto Ierusalimschy <roberto@...>
Date: Fri, 15 Apr 2016 13:53:34 -0300
This whole story goes back to these messages: https://github.com/xolox/lua-lxsh/issues/5 (the problem) http://lua-users.org/lists/lua-l/2015-07/msg00356.html (the "fix") The issue is that I "fixed" t

Search by Namazu v2.0.21