Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 897 Bytes

File metadata and controls

21 lines (15 loc) · 897 Bytes

Fixed -- A simple templated class for fixed-point arithmetic

Overview

Fixed is a simple templated class for fixed-point arithmetic. On some systems, typically embedded systems, a floating point unit is either unavailable or is very slow; fixed-point arithmetic can be much faster on such systems. Additionally, integer adds and subtracts are often faster than their floating point analogues so if your computation involves very few multiplies and divides you may find that fixed point arithmetic yields faster results.

Usage

A sample program named test_fixed and a Makefile are provided. Just type make to build it and run it with ./test_fixed.

Contact

I appreciate feedback, so if you have any questions, suggestions or patches, please send me email: amberarrow at gmail with the usual extension. Thanks.