[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: int32 & float live together (Re: Question about table arrays)
- From: Asko Kauppi <askok@...>
- Date: Tue, 10 Jan 2006 02:22:18 +0200
I have an unpublished patch for making Lua 5.1-w4 run with _both_
float and int32 number types, transparently to the application layer.
This is imho highly useful on ARM etc. platforms that don't have an FPU.
The patch adds complexity to the code, and is not much faster than
pure-float code would be. However, it does offer "clean" integer
range, while using 24-bit for floating points. Anyone interested? :)
-asko
Rici Lake kirjoitti 9.1.2006 kello 18.09:
On the other hand, if the Lua instance were compiled with
lua_Number as a (single-precision) float, then the array part could
grow to a larger size than could be represented as an integral
lua_Number, which seems like it ought to trigger an error of some
sort.