luafixmath Lua binding for fixmath lib ( http://savannah.nongnu.org/projects/fixmath/ ). You can change the FIX_MATH_FRACTIONAL_BIT_COUNT to 16 - 1 before compiling to support (N).(32-N) fixed point number.