coderhe / fixed_math

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is yet another Q31.32 fixed point project.

Involved math functions: sin, cos, tan, asin, acos, atan, exp, log, pow, sqrt. Most of them are based on LUT.

Usage

File Description
fixed_math.h Provides c-style functions.
fixed_number.h The c++ wrapper class.
lut.py Python script for LUT generation.

Build

LLVM is a recommanded toolchain and GCC should also work well.

To build for the platforms which are not support __int128, such as MSVC or 32bit arch platforms, you may need to clone a boost repo into this project to be an alternative.

About


Languages

Language:C++ 98.1%Language:C 1.4%Language:Python 0.5%