A fixed point math header-library for C, under a liberal license.
Features
- Fixed point math library
- Requires a fairly modern C compiler with uint32_t and uint64_t
- 32-bit and 64-bit precision support (for compilers with __int128_t extensions like gcc)
- Arbitrary precision point (e.g. 24.8 or 32.32)
- Pure header-only
- Pure integer-only (suitable for kernels, embedded CPUs, etc)
License
BSD LicenseFollow Fixed Point Math Library for C
Other Useful Business Software
Ship Agents Faster
Gemini platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. Developers get access to both Gemini and third-party models.
Rate This Project
Login To Rate This Project
User Reviews
-
4 out of 5 starsfixedpt_sqrt() returns 0 for any number if FIXEDPT_BITS == 64. To fix this, inside fixedpt_sqrt define variables l and s as fixedpt instead of int.
-
5 out of 5 starsHi. I dont know how to submit code here but the fixedpt_str 'negation' should look like this: if (A < 0) { str[slen++] = '-'; A=~A; //A *= -1; }
-
5 out of 5 starsthis library works very well. i Have modified the code to get a higher precision by the sin function. is there an explanation to the code for sin function. don't unterstand every row regards eric