The JasPer library provides various functions/macros for performing fixed-point arithmetic. It also provides some functions for performing safe integer arithmetic (i.e.., integer arithmetic with overflow checking). The details of these macros/functions can be found using the link in the API References section above.