Read more here: [https://freemodelfoundry.com/fphdl/Fixed_ug.pdf](https://freemodelfoundry.com/fphdl/Fixed_ug.pdf) Using types that support fixed point arithmetic will hopefully simplify the code, i.e. make it easier to read.