An open API service indexing awesome lists of open source software.

https://github.com/trcwm/fplib

Arbitrary precision fixed-point library for C++
https://github.com/trcwm/fplib

arbitrary-precision fixed-point library

Last synced: about 1 year ago
JSON representation

Arbitrary precision fixed-point library for C++

Awesome Lists containing this project

README

          

# FPLIB
An arbitrary precision fixed-point library for C++

Author: Niels A. Moseley / Moseley Instruments.

License: to be determined

The aim of this library is to provide a signed fixed-point data type for logic simulation and synthesis as well as digital signal processing applications. It is based on 32-bit words and therefore needs a 32-bit platform to run efficiently.

### Example: sqrt(2)
Using the bisection method, this library was used to determine the square-root of two with 2048 bits of precision. The exact value is between

```0x16a09e667f3bcc908b2fb1366ea957d3e3adec17512775099da2f590b0667322a95f90608757145875163fcdfb907b6721ee950bc8738f694f0090e6c7bf44ed1a4405d0e855e3e9ca60b38c0237866f7956379222d108b148c1578e45ef89c678dab5147176fd3b99654c68663e7909bea5e241f06dcb05dd5494113208194950272956db1fa1dfbe9a74059d7927c1884c9b579aa516ca3719e6836df046d8e0209b803fc646a5e6654bd3ef7b43d7fed437c7f9444260fbd40c483ef55038583f97bbd45efb8663107145d5febe765a49e94ec7f597105fbfc2e1fa763ef01f3599c82f2fe500b848cf0bd252ae046bf9f1ef7947d46769af8c14bcc67c7c2 / 2^2048```

and

```0x16a09e667f3bcc908b2fb1366ea957d3e3adec17512775099da2f590b0667322a95f90608757145875163fcdfb907b6721ee950bc8738f694f0090e6c7bf44ed1a4405d0e855e3e9ca60b38c0237866f7956379222d108b148c1578e45ef89c678dab5147176fd3b99654c68663e7909bea5e241f06dcb05dd5494113208194950272956db1fa1dfbe9a74059d7927c1884c9b579aa516ca3719e6836df046d8e0209b803fc646a5e6654bd3ef7b43d7fed437c7f9444260fbd40c483ef55038583f97bbd45efb8663107145d5febe765a49e94ec7f597105fbfc2e1fa763ef01f3599c82f2fe500b848cf0bd252ae046bf9f1ef7947d46769af8c14bcc67c7c4 / 2^2048.```