Libfixmath: Difference between revisions

Content deleted Content added
Created libfixmath wikipedia page.
 
Citation bot (talk | contribs)
Added website. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Numerical software | #UCB_Category 67/119
 
(45 intermediate revisions by 20 users not shown)
Line 1:
{{Primary sources|date=January 2023}}
{{lowercase|title=libfixmath}}
{{Infobox software
| name = libfixmath
| developer = [[Ben Brewer]] (aka flatmush)
| latest_release_version = r7r64
| latest_release_date = {{Start date and age|20112012|02|2302}}
| programming language = [[C (programming language)|C99]]
| operating_system = [[Cross-platform software|Cross-platform]]
| genre = [[fixed-point arithmetic|fixed -point math library]]
| license = [[GNU Lesser General PublicMIT License|GNU LGPLMIT]]
| website = http://code.google.com/p/libfixmath
| status = active
}}
 
'''libfixmath''' is a [[platform independent|platform-independent]] [[fixed-point arithmetic|fixed point]] maths library aimed at developers wanting to perform fast non-integer maths on platforms lacking a [[Floating Point Unit|FPU]]. It offers developers a similar interface to the standard [[Math.h|math.h]] functions for use on [[Q (number format)|Q16.16]] [[fixed-point arithmetic|fixed point]] numbers.
'''libfixmath''' is a [[cross-platform software|platform-independent]] [[fixed-point arithmetic|fixed-point]] math library aimed at developers wanting to perform fast non-integer math on platforms lacking a (or with a low performance) [[Floating Point Unit|FPU]]. It offers developers a similar interface to the standard [[math.h]] functions for use on [[Q (number format)|Q16.16]] [[fixed-point arithmetic|fixed-point]] numbers. libfixmath has no external dependencies other than [[Stdint.h|stdint.h]] and a compiler which supports [[64-bit]] integer arithmetic (such as [[GNU Compiler Collection|GCC]]).<ref>{{cite web|url=httphttps://code.googlegithub.com/pPetteriAimonen/libfixmath|title=libfixmath Project Page|website=[[GitHub]] }}</ref>
WorkConditional iscompilation underwayoptions exist to remove the requirement for a [[64-bit]] capable [[compiler]] as many compilers for [[Microcontroller|microcontrollersmicrocontroller]]s and [[Digital signal processor|DSPs]] do not support [[64-bit]] arithmetic.<ref>{{cite web|url=httphttps://code.google.com/p/libfixmath/issues/detail?id=4|title=64-bit Compiler Support Issues}}</ref>
 
==History==
'''libfixmath''' was originally developed by [[Ben Brewer]] (aka flatmush) and first released publicly as part of the [[Dingoo A320|DingooSDK]] SDK.<ref>{{cite web|url=httphttps://code.google.com/p/dingoo-sdk|title=Dingoo SDK Project Page}}</ref> It has since been used to implement a (currentlysoftware closed source) 3d[[3D graphics]] library called FGL.<ref>{{cite web|url=httphttps://boardscode.dingoonitygoogle.orgcom/dingoo-development/platform-independant-dingoo-sdkp/fgl|title=DingooFGL SDKFlatmush/Fixed-Point Graphics ReleaseLibrary Project Page}}</ref>
 
==Q16.16 Functionsfunctions==
'''libfixmath''' was originally developed by [[Ben Brewer]] (aka flatmush) and first released publicly as part of the [[Dingoo A320|Dingoo]] SDK.<ref>{{cite web|url=http://code.google.com/p/dingoo-sdk|title=Dingoo SDK Project Page}}</ref> It has since been used to implement a (currently closed source) 3d graphics library called FGL.<ref>{{cite web|url=http://boards.dingoonity.org/dingoo-development/platform-independant-dingoo-sdk/|title=Dingoo SDK Release Page}}</ref>
 
==Q16.16 Functions==
 
{|class="wikitable"
|-
Line 35 ⟶ 33:
|-
|<code>fix16_cos</code> || [[cosine]]
|-
|<code>fix16_exp</code> || [[exponential function]]
|-
|<code>fix16_sin</code> || [[sine]]
Line 42:
|<code>fix16_tan</code> || [[tangent (trigonometric function)|tangent]]
|-
|<code>fix16_mul</code> || [[Multiplication|multiplication]]
|-
|<code>fix16_div</code> || [[Division (mathematics)|division]]
|-
|<code>fix16_sadd</code> || [[Saturation arithmetic|saturated]] [[Addition|addition]]
|-
|<code>fix16_smul</code> || [[Saturation arithmetic|saturated]] [[Multiplication|multiplication]]
|-
|<code>fix16_sdiv</code> || [[Saturation arithmetic|saturated]] [[Division (mathematics)|division]]
|}
 
==Other Functionsfunctions==
 
{|class="wikitable"
|-
Line 72 ⟶ 71:
|}
 
==LicensingPerformance==
For the most intensive function ([[atan2]]) benchmark results show the following results:
 
{|class="wikitable"
'''libfixmath''' is released under the [[GNU Lesser General Public License|GNU LGPL]], a [[permissive free software licence]], and is [[free software]].
|-
! Name !! Time Compared to Float
|-
|[[ARM Cortex-M0]] || 26.3%
|-
|[[Marvell Technology Group|Marvell]] [[XScale|PXA270]] ([[ARM architecture|ARM]]) @ 312&nbsp;MHz || 58.45%
|-
|[[List of Intel Core 2 microprocessors|Intel T5500]] || 120%
|-
|[[Intel atom|Intel Atom N280]] || 141%
|}
Note: These results were calculated using fixtest with caching optimizations turned off.<ref>{{cite web|url=https://code.google.com/p/libfixmath/downloads/detail?name=fixtest_r16.zip|title=fixtest Download Page}}</ref>
 
==External linksLicensing==
'''libfixmath''' is released under the [[GNU Lesser General PublicMIT License|GNU LGPL]], a [[permissive free software licence]], and is [[free software]].
* [http://code.google.com/p/libfixmath|title=libfixmath Project Page]
 
* [http://groups.google.com/group/libfixmath|title=libfixmath Group Page/Mailing List]
==See also==
{{Portal|Free Software}}
* [[Binary scaling]]
* [[Fixed-point arithmetic]]
* [[Floating-point arithmetic]]
* [[Q (number format)]]
 
==References==
{{Reflist}}
 
==External links==
* [https://github.com/PetteriAimonen/libfixmath Project Page]
* [http://codegroups.google.com/pgroup/libfixmath|title=libfixmath ProjectGroup Page/Mailing List]
 
[[Category:Numerical software]]
[[Category:C (programming language) libraries]]
[[Category:Free development toolkits andcomputer libraries]]
[[Category:Free software programmed in C]]