HOME

TheInfoList



OR:

libfixmath is a platform-independent fixed-point math library aimed at developers wanting to perform fast non-integer math on platforms lacking a (or with a low performance)
FPU FPU may stand for: Universities * Florida Polytechnic University, in Lakeland, Florida, United States * Franklin Pierce University, in New Hampshire, United States * Fresno Pacific University, in California, United States * Fukui Prefectural Univ ...
. It offers developers a similar interface to the standard math.h functions for use on Q16.16 fixed-point numbers. libfixmath has no external dependencies other than
stdint.h In the C programming language, data types constitute the semantics and characteristics of storage of data elements. They are expressed in the language syntax in form of declarations for memory locations or variables. Data types also determin ...
and a compiler which supports
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit CPUs and ALUs are those that are based on processor registers, address buses, or data buses of that size. A comp ...
integer arithmetic (such as GCC). Conditional compilation options exist to remove the requirement for a
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit CPUs and ALUs are those that are based on processor registers, address buses, or data buses of that size. A comp ...
capable
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
as many compilers for
microcontroller A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs ( processor cores) along with memory and programma ...
s and DSPs do not support
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit CPUs and ALUs are those that are based on processor registers, address buses, or data buses of that size. A comp ...
arithmetic.


History

libfixmath was developed by Ben Brewer and first released publicly as part of the
Dingoo SDK The Dingoo SDK is a software development kit for the Dingoo A320 video game console and other compatible devices, such as the Gemei X760+ and Dingoo A330. History Dingoo SDK was originally developed by Ben Brewer (aka flatmush) and first relea ...
. It has since been used to implement a software 3D graphics library called FGL.


Q16.16 functions


Other functions


Performance

For the most intensive function ( atan2) benchmark results show the following results: Note: These results were calculated using fixtest with caching optimizations turned off.


Licensing

libfixmath is released under the
MIT License The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license co ...
, a permissive free software licence, and is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, ...
.


See also

* Binary scaling *
Fixed-point arithmetic In computing, fixed-point is a method of representing fractional (non-integer) numbers by storing a fixed number of digits of their fractional part. Dollar amounts, for example, are often stored with exactly two fractional digits, represent ...
*
Floating-point arithmetic In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can b ...
* Q (number format)


References

{{Reflist


External links


Project Page

Group Page/Mailing List
Numerical software C (programming language) libraries Free computer libraries Free software programmed in C