Recent

Author Topic: Fixed Point Math Lib for FreePascal  (Read 5023 times)

jay3d

  • Newbie
  • Posts: 4
Fixed Point Math Lib for FreePascal
« on: January 29, 2012, 09:33:37 am »
Hi,

I've made an independent fixed point math lib for FreePascal because i couldn't find one.

It's based in part on some other C fixed point math libs.

Any comments, further development, optimizations ... etc. are highly appreciated :)

Cheers!
Jay

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Fixed Point Math Lib for FreePascal
« Reply #1 on: January 31, 2012, 09:13:01 am »
Nice work. You can also take a look at my AFP (Arbitrary Fixed Point) math library here:
http://forum.e-lab.de/topic.php?t=2387&page=fst_unread&highlight=fixed;point;math
It is for E-Lab AvrCo Multitasking Pascal compiler (for Atmel AVR and Arduino microcontrollers). More info about this great compiler here:
http://e-lab.de/AVRco/index_en.html
Library let's you choose number of bits for integer and decimal part as long as total number of bits is 32, but it is not hard to adapt it to any other number. Basic trigonometry involved. More optimized Q31.32 version with 64 bits in total and full trigonometry is now part of the compiler. Besides many other things, it is used to accurately position an astronomy telescope and track the object from the sky in real time.
 :)

Update: Since E-Lab's forum software has changed, old messages have been lost. Therefore you can download AFP from AVR Freaks:
http://community.atmel.com/projects/afp-arbitrary-fixed-point-lib
« Last Edit: April 26, 2017, 07:00:27 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

 

TinyPortal © 2005-2018