Fixed-Point DS Lua

This is a customized version of Lua (5.1.4) that uses 20.12 fixed point instead of double for its number type. The main reason for this change is to speed up arithmetic (the DS doesn’t have an FPU). Keep in mind that the change in number format limits the usable range to [-219, 219)

Included in the tools folder are a replacement math lib which uses lookup tables for trig functions and a Haskell script. The script takes a sanitized C header file and generates the required code to export those functions as a Lua library.

Download

One thought on “Fixed-Point DS Lua

  1. Hello,good lib!
    I have look around these code,but seem that I can not find the implement of the function floattof32 and f32tofloat.Is there sth I miss?
    Hope for your reply.ThankU!

Leave a comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>