summaryrefslogtreecommitdiff
path: root/lib/fixedpoint/fixedpoint.c (follow)
Commit message (Collapse)AuthorAge
* Undo hacks to meant to get around string formatting limitationsMichael Sevakis2017-11-21
| | | | | | | | | | | | | | | The new vuprintf makes unnecessary workarounds due to formatting limitations. I checked grep output for whatever appeared to fit but it's possible I missed some instances because they weren't so obvious. Also, this means sound settings can dynamically work with any number of decimals rather than the current assumption of one or two. Add an ipow() function to help and take advantage of dynamic field width and precision. Consolidate string formatting of sound settings. Change-Id: I46caf534859dfd1916cd440cd25e5206b192fcd8
* Need limits.h for hosted buildsMichael Sevakis2017-10-01
| | | | Change-Id: Iac1433957de80ad5db51396f74acf1f4f8d45bf3
* Replace fp_sqrt function with one that only uses shift, or and sub.Michael Sevakis2017-10-01
| | | | | | | | | | | | Simply extends the current isqrt() to be able to do fractional bits and improves the initial estimate using clz(). iqrt() itself is no more and is equivalent to fp_sqrt(x, 0). The original also had a small bug where the guess comparision should have been >=, not >. Uses no large integer math or division and is very accurate (simply returns a truncated fraction). Change-Id: I2ae26e6505df1770dc01e56220f7385369f90ae9
* Make fixepoint.c as a shared library (libfixedpoint.a).Michael Sevakis2013-04-26
Change-Id: Icc10d6e85f890c432f191233a4d64e09f00be43d Reviewed-on: http://gerrit.rockbox.org/456 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>