This modules provides some integer-only math functions.
More...
This modules provides some integer-only math functions.
They can be used when no FPU is available or no exact precision is needed.
- Author
- Karl Fessel karl..nosp@m.fess.nosp@m.el@ov.nosp@m.gu.d.nosp@m.e
|
static int32_t | _ihelp (int32_t x) |
| Internal fast_sini/fast_cosi helper function.
|
|
static int32_t | fast_sini (int32_t x) |
| A sine approximation via a fourth-order cosine approx.
|
|
static int32_t | fast_cosi (int32_t x) |
| A a fourth-order cosine approx.
|
|
static unsigned | sqrti (unsigned x) |
| Square root of an integer.
|
|
static uint32_t | powi (unsigned x, unsigned y) |
| Returns the value of x to the power of y.
|
|
◆ SINI_MAX
◆ SINI_MIN
◆ SINI_PERIOD
#define SINI_PERIOD 0x8000 |
◆ _ihelp()
static int32_t _ihelp |
( |
int32_t |
x | ) |
|
|
inlinestatic |
Internal fast_sini/fast_cosi helper function.
Definition at line 43 of file imath.h.
◆ fast_cosi()
static int32_t fast_cosi |
( |
int32_t |
x | ) |
|
|
inlinestatic |
◆ fast_sini()
static int32_t fast_sini |
( |
int32_t |
x | ) |
|
|
inlinestatic |
◆ powi()
static uint32_t powi |
( |
unsigned |
x, |
|
|
unsigned |
y |
|
) |
| |
|
inlinestatic |
Returns the value of x to the power of y.
- Parameters
-
- Returns
- x^y
Definition at line 128 of file imath.h.
◆ sqrti()
static unsigned sqrti |
( |
unsigned |
x | ) |
|
|
inlinestatic |
Square root of an integer.
- Parameters
-
- Returns
- square root of
x
Definition at line 102 of file imath.h.