47#ifndef __STDFIX_FULL_ISO_H__
48#define __STDFIX_FULL_ISO_H__
59#define min(a, b) (((a)<(b)) ? (a) : (b))
67#define __stdfix_max(a, b) \
68 (((a)<(b)) ? (b) : (a))
75#define __stdfix_use(a) \
76 do {} while ((a)!=(a))
82#define __stdfix_abs(a) \
83 (((a)<0) ? -(a) : (a))
89#define __stdfix_ms_u32(x) \
96#define __stdfix_ls_u32(x) \
165#ifdef ECLIPSE_CDT_INDEXER_HACK
190typedef unsigned short fract
u08;
196typedef unsigned long fract
u032;
199typedef unsigned short accum
u88;
213typedef int32_t
s1615;
214typedef int64_t
s3231;
217typedef uint16_t
u016;
218typedef uint32_t
u032;
220typedef uint32_t
u1616;
221typedef uint64_t
u3232;
549#define __I(x) ((int) (x))
551#define __I32(x) ((int32_t) (x))
553#define __I64(x) ((int64_t) (x))
555#define __LI(x) ((long int) (x))
557#define __U32(x) ((uint32_t) (x))
559#define __U64(x) ((uint64_t) (x))
561#define __UI(x) ((unsigned int) (x))
563#define __ULI(x) ((unsigned long int) (x))
673 if (x > UINT16_MAX) {
687 if (x > UINT32_MAX) {
701 if (x > UINT16_MAX) {
715 if (x > UINT32_MAX) {
869#ifdef __ARM_FEATURE_DSP
885#ifdef __ARM_FEATURE_DSP
899#ifdef __ARM_FEATURE_DSP
935 if (x == INT8_MIN && y == INT8_MIN) {
951 if (x == INT16_MIN && y == INT16_MIN) {
967 if (x == INT32_MIN && y == INT32_MIN) {
983 if (x == INT16_MIN && y == INT16_MIN) {
999 if (x == INT32_MIN && y == INT32_MIN) {
1306 int64_t k =
__I64(n) * (r >> 31);
1307 int64_t c = (
__I64(n) * (r & INT64_C(0x7FFFFFF))) >> 31;
1476 unsigned long int n,
1502 unsigned long int n,
1506 uint64_t k =
__U64(n) * (r >> 32);
1507 uint64_t c = (
__U64(n) * (r & INT64_C(0xFFFFFFF))) >> 32;
1509 return __ULI(k + c);
1532 unsigned long int n,
1558 unsigned long int n,
1583 unsigned long int i,
1584 unsigned long int j)
1608 unsigned long int i,
1609 unsigned long int j)
1683 r = (r == INT8_MIN) ? INT8_MAX : -r;
1699 r = (r == INT16_MIN) ? INT16_MAX : -r;
1715 r = (r == INT32_MIN) ? INT32_MAX : -r;
1731 r = (r == INT16_MIN) ? INT16_MAX : -r;
1747 r = (r == INT32_MIN) ? INT32_MAX : -r;
1763 r = (r == INT64_MIN) ? INT64_MAX : -r;
1796 register uint8_t r, c;
1798 c = (x >> (n-1)) & 0x1;
1815 register uint16_t r, c;
1817 c = (x >> (n-1)) & 0x1;
1834 register uint32_t r, c;
1836 c = (x >> (n-1)) & 0x1;
1853 register uint64_t r, c;
1855 c = (x >> (n-1)) & 0x1;
1872 register int8_t r, c;
1874 c = (x >> (n-1)) & 0x1;
1891 register int16_t r, c;
1893 c = (x >> (n-1)) & 0x1;
1910 register int32_t r, c;
1912 c = (x >> (n-1)) & 0x1;
1929 register int64_t r, c;
1931 c = (x >> (n-1)) & 0x1;
2125 return __builtin_clrsb(n) - 24;
2141 return __builtin_clrsb(n) - 16;
2158 return __builtin_clrsb(n);
2175 return __builtin_clrsb(n) - 16;
2191 return __builtin_clrsb(n);
2208 return __builtin_clrsbll(n);
2225 return __builtin_clz(n) - 24;
2242 return __builtin_clz(n) - 16;
2259 return __builtin_clz(n);
2276 return __builtin_clz(n) - 16;
2293 return __builtin_clz(n);
2310 return __builtin_clzll(n);
2354#define roundfx(f, n) \
2356 s07: roundhr(f, n), \
2357 s015: roundr(f, n), \
2358 s031: roundlr(f, n), \
2359 s87: roundhk(f, n), \
2360 s1615: roundk(f, n), \
2361 s3231: roundlk(f, n), \
2362 u08: rounduhr(f, n), \
2363 u016: roundur(f, n), \
2364 u032: roundulr(f, n), \
2365 u88: rounduhk(f, n), \
2366 u1616: rounduk(f, n), \
2367 u3232: roundulk(f, n), \
2376#define countlsfx(f) \
2378 s07: countlshr(f), \
2379 s015: countlsr(f), \
2380 s031: countlslr(f), \
2381 s87: countlshk(f), \
2382 s1615: countlsk(f), \
2383 s3231: countlslk(f), \
2384 u08: countlsuhr(f), \
2385 u016: countlsur(f), \
2386 u032: countlsulr(f), \
2387 u88: countlsuhk(f), \
2388 u1616: countlsuk(f), \
2389 u3232: countlsulk(f), \
2458s07 strtofxhr (
const char *restrict nptr,
char **restrict endptr);
2459s015 strtofxr (
const char *restrict nptr,
char **restrict endptr);
2460s031 strtofxlr (
const char *restrict nptr,
char **restrict endptr);
2461s87 strtofxhk (
const char *restrict nptr,
char **restrict endptr);
2462s1615 strtofxk (
const char *restrict nptr,
char **restrict endptr);
2463s3231 strtofxlk (
const char *restrict nptr,
char **restrict endptr);
2465u08 strtofxuhr(
const char *restrict nptr,
char **restrict endptr);
2466u016 strtofxur (
const char *restrict nptr,
char **restrict endptr);
2467u032 strtofxulr(
const char *restrict nptr,
char **restrict endptr);
2468u88 strtofxuhk(
const char *restrict nptr,
char **restrict endptr);
2469u1616 strtofxuk (
const char *restrict nptr,
char **restrict endptr);
2470u3232 strtofxulk(
const char *restrict nptr,
char **restrict endptr);
static unsigned long int muliulr(unsigned long int n, u032 x)
Multiplies an unsigned long integer by an unsigned long fract giving an unsigned integer answer.
Definition stdfix-full-iso.h:1475
short fract s07
An alternative name for the signed short fract type.
Definition stdfix-full-iso.h:172
static uint32_t __stdfix_sadd_ur(uint32_t x, uint32_t y)
Saturated addition of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1045
int16_t int_r_t
This is the integer type into which signed fract can be converted.
Definition stdfix-full-iso.h:117
static s3231 lkbits(const int_lk_t n)
Converts a signed integer into a signed long accum.
Definition stdfix-full-iso.h:459
void __stdfix_64x64_128(uint64_t *hi, uint64_t *lo, uint64_t x, uint64_t y)
Multiplies two 64-bit unsigned integers returning a 128-bit result in hi and lo.
static long int divilk(long int n, s3231 x)
Divides an integer by a long accum giving a long integer answer.
Definition stdfix-full-iso.h:1353
static u3232 roundulk(u3232 f, int n)
This function rounds the input unsigned long accum to a number of bits, returning an unsigned long ac...
Definition stdfix-full-iso.h:2087
uint64_t __stdfix_sadd_ulk(uint64_t x, uint64_t y)
Saturated addition of the underlying unsigned integer representations.
static uint_uhk_t bitsuhk(const u88 f)
Converts an unsigned short accum into an integer.
Definition stdfix-full-iso.h:350
static unsigned int diviuk(unsigned int n, u1616 x)
Divides an unsigned integer by an unsigned accum giving an unsigned integer answer.
Definition stdfix-full-iso.h:1544
static int countlsuhr(u08 f)
This function counts the number of leading zeros of an unsigned short fract.
Definition stdfix-full-iso.h:2216
uint32_t uint_ulr_t
This is the unsigned integer type into which unsigned long fract can be converted.
Definition stdfix-full-iso.h:144
static int countlsulr(u032 f)
This function counts the number of leading zeros of an unsigned long fract.
Definition stdfix-full-iso.h:2250
static u032 ulrbits(const uint_ulr_t n)
Converts an unsigned integer into an unsigned long fract.
Definition stdfix-full-iso.h:498
static int countlsuk(u1616 f)
This function counts the number of leading zeros of an unsigned accum.
Definition stdfix-full-iso.h:2284
#define __UI(x)
Cast to unsigned int.
Definition stdfix-full-iso.h:561
static int divik(int n, s1615 x)
Divides an integer by an accum giving an integer answer.
Definition stdfix-full-iso.h:1341
static int countlsk(s1615 f)
This function counts the number of leading sign-bits of an accum.
Definition stdfix-full-iso.h:2182
static s031 lrbits(const int_lr_t n)
Converts a signed integer into a signed long fract.
Definition stdfix-full-iso.h:420
static int_hr_t bitshr(const s07 f)
Converts a short fract into an integer.
Definition stdfix-full-iso.h:233
static uint32_t __stdfix_smul_ulr(uint32_t x, uint32_t y)
Saturated multiplication of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1198
static s07 roundhr(s07 f, int n)
This function rounds the input short fract to a number of bits, returning a short fract.
Definition stdfix-full-iso.h:1944
unsigned fract u016
An alternative name for the unsigned fract type.
Definition stdfix-full-iso.h:193
int64_t __stdfix_ssub_lk(int64_t x, int64_t y)
Saturated subtraction of the underlying integer representations.
unsigned accum u1616
An alternative name for the unsigned accum type.
Definition stdfix-full-iso.h:202
static int mulik(int n, s1615 x)
Multiplies an integer by an accum giving an integer answer.
Definition stdfix-full-iso.h:1288
static int32_t __stdfix_ssub_hr(int_hr_t x, int_hr_t y)
Saturated subtraction of the underlying integer representations.
Definition stdfix-full-iso.h:741
static int countlsur(u016 f)
This function counts the number of leading zeros of an unsigned fract.
Definition stdfix-full-iso.h:2233
static int countlsr(s015 f)
This function counts the number of leading sign-bits of a fract.
Definition stdfix-full-iso.h:2132
uint8_t uint_uhr_t
This is the unsigned integer type into which unsigned short accum can be converted.
Definition stdfix-full-iso.h:136
static int countlshr(s07 f)
This function counts the number of leading sign-bits of a short fract.
Definition stdfix-full-iso.h:2116
static int countlslr(s031 f)
This function counts the number of leading sign-bits of a long fract.
Definition stdfix-full-iso.h:2149
static uint32_t __stdfix_sadd_uk(uint32_t x, uint32_t y)
Saturated addition of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1123
static uint32_t __stdfix_smul_uhr(uint32_t x, uint32_t y)
Saturated multiplication of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1168
static int_lr_t bitslr(const s031 f)
Converts a long fract into an integer.
Definition stdfix-full-iso.h:259
static int mulir(int n, s015 x)
Multiplies an integer by a fract giving an integer answer.
Definition stdfix-full-iso.h:1264
uint16_t uint_ur_t
This is the unsigned integer type into which unsigned fract can be converted.
Definition stdfix-full-iso.h:140
long accum s3231
An alternative name for the signed long accum type.
Definition stdfix-full-iso.h:187
static long int idivlk(s3231 x, s3231 y)
Divides two long accums giving a long integer answer.
Definition stdfix-full-iso.h:1449
int16_t int_hk_t
This is the integer type into which signed short accum can be converted.
Definition stdfix-full-iso.h:125
static u016 roundur(u016 f, int n)
This function rounds the input unsigned fract to a number of bits, returning an unsigned fract.
Definition stdfix-full-iso.h:2035
static uint_uk_t bitsuk(const u1616 f)
Converts an unsigned accum into an integer.
Definition stdfix-full-iso.h:363
static int divir(int n, s015 x)
Divides an integer by a fract giving an integer answer.
Definition stdfix-full-iso.h:1317
static int32_t __stdfix_ssub_r(int32_t x, int32_t y)
Saturated subtraction of the underlying integer representations.
Definition stdfix-full-iso.h:775
static unsigned int muliur(unsigned int n, u016 x)
Multiplies an unsigned integer by an unsigned fract giving an unsigned integer answer.
Definition stdfix-full-iso.h:1462
static s015 roundr(s015 f, int n)
This function rounds the input fract to a number of bits, returning a fract.
Definition stdfix-full-iso.h:1957
int8_t int_hr_t
This is the integer type into which signed short fract can be converted.
Definition stdfix-full-iso.h:114
static u032 ulrdivi(unsigned long int i, unsigned long int j)
Divides two unsigned long integers giving an unsigned long fract answer.
Definition stdfix-full-iso.h:1582
static u1616 ukdivi(unsigned int i, unsigned int j)
Divides two unsigned integers giving an unsigned accum answer.
Definition stdfix-full-iso.h:1594
#define __U32(x)
Cast to uint32_t.
Definition stdfix-full-iso.h:557
static int32_t __stdfix_sat_hr(const int32_t x)
Saturates an integer to 8 bits.
Definition stdfix-full-iso.h:571
static uint32_t __stdfix_ssub_uhk(uint32_t x, uint32_t y)
Saturated subtraction of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1110
static unsigned long int idivulr(u032 x, u032 y)
Divides two unsigned long fracts giving an unsigned long integer answer.
Definition stdfix-full-iso.h:1632
static u08 uhrbits(const uint_uhr_t n)
Converts an unsigned integer into an unsigned short fract.
Definition stdfix-full-iso.h:472
fract s015
An alternative name for the signed fract type.
Definition stdfix-full-iso.h:175
static uint32_t __stdfix_sat_ur(const uint32_t x)
Saturates an unsigned integer to 16 bits.
Definition stdfix-full-iso.h:670
int64_t __stdfix_sneg_lk(int64_t x)
Saturated negation of the underlying integer representations.
static uint32_t __stdfix_sadd_uhk(uint32_t x, uint32_t y)
Saturated addition of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1097
#define __U64(x)
Cast to uint64_t.
Definition stdfix-full-iso.h:559
uint32_t uint_uk_t
This is the unsigned integer type into which unsigned accum can be converted.
Definition stdfix-full-iso.h:152
uint64_t __stdfix_ssub_ulk(uint64_t x, uint64_t y)
Saturated subtraction of the underlying unsigned integer representations.
uint64_t __stdfix_smul_ulk(uint64_t x, uint64_t y)
Saturated multiplication of the underlying unsigned integer representations.
static u08 rounduhr(u08 f, int n)
This function rounds the input unsigned short fract to a number of bits, returning an unsigned short ...
Definition stdfix-full-iso.h:2022
static uint_uhr_t bitsuhr(const u08 f)
Converts an unsigned short fract into an integer.
Definition stdfix-full-iso.h:311
static int_k_t bitsk(const s1615 f)
Converts an accum into an integer.
Definition stdfix-full-iso.h:285
static int32_t __stdfix_sneg_k(int32_t x)
Saturated negation of the underlying integer representations.
Definition stdfix-full-iso.h:896
static unsigned int idivuk(u1616 x, u1616 y)
Divides two unsigned accums giving an unsigned integer answer.
Definition stdfix-full-iso.h:1644
static uint16_t __stdfix_round_u16(uint16_t x, int n)
This function rounds the input unsigned 16-bit integer to a number of bits, returning a 16-bit intege...
Definition stdfix-full-iso.h:1811
static unsigned long int diviulk(unsigned long int n, u3232 x)
Divides a long unsigned integer by a long unsigned accum giving an unsigned integer answer.
Definition stdfix-full-iso.h:1557
static int32_t __stdfix_smul_hk(int32_t x, int32_t y)
Saturated multiplication of the underlying integer representations.
Definition stdfix-full-iso.h:979
static long int mulilk(long int n, s3231 x)
Multiplies a long integer by a long accum giving a long integer answer.
Definition stdfix-full-iso.h:1301
int32_t int_lr_t
This is the integer type into which signed long fract can be converted.
Definition stdfix-full-iso.h:121
static s3231 roundlk(s3231 f, int n)
This function rounds the input long accum to a number of bits, returning a long accum.
Definition stdfix-full-iso.h:2009
static int16_t __stdfix_round_s16(int16_t x, int n)
This function rounds the input signed 16-bit integer to a number of bits, returning a 16-bit integer.
Definition stdfix-full-iso.h:1887
static int32_t __stdfix_smul_hr(int32_t x, int32_t y)
Saturated multiplication of the underlying integer representations.
Definition stdfix-full-iso.h:931
static int32_t __stdfix_sadd_r(int32_t x, int32_t y)
Saturated addition of the underlying integer representations.
Definition stdfix-full-iso.h:763
unsigned short fract u08
An alternative name for the unsigned short fract type.
Definition stdfix-full-iso.h:190
static int32_t __stdfix_sadd_lr(int32_t x, int32_t y)
Saturated addition of the underlying integer representations.
Definition stdfix-full-iso.h:797
static u88 uhkbits(const uint_uhk_t n)
Converts an unsigned integer into an unsigned short accum.
Definition stdfix-full-iso.h:511
static uint_ulk_t bitsulk(const u3232 f)
Converts an unsigned long accum into an integer.
Definition stdfix-full-iso.h:376
static int32_t __stdfix_sat_k(const int64_t x)
Saturates a 64-bit integer to 32-bits.
Definition stdfix-full-iso.h:639
static s1615 absk(s1615 f)
This function returns the absolute value of an accum.
Definition stdfix-full-iso.h:1741
static unsigned long int muliulk(unsigned long int n, u3232 x)
Multiplies an unsigned long integer by an unsigned long accum giving an unsigned long integer answer.
Definition stdfix-full-iso.h:1501
static int32_t __stdfix_smul_k(int32_t x, int32_t y)
Saturated multiplication of the underlying integer representations.
Definition stdfix-full-iso.h:995
static uint32_t __stdfix_smul_uhk(uint32_t x, uint32_t y)
Saturated multiplication of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1214
static s031 roundlr(s031 f, int n)
This function rounds the input long fract to a number of bits, returning a long fract.
Definition stdfix-full-iso.h:1970
static s3231 abslk(s3231 f)
This function returns the absolute value of a long accum.
Definition stdfix-full-iso.h:1757
static uint32_t __stdfix_sat_ulr(const uint64_t x)
Saturates an unsigned 64-bit integer to 32 bits.
Definition stdfix-full-iso.h:684
static s87 abshk(s87 f)
This function returns the absolute value of a short accum.
Definition stdfix-full-iso.h:1725
static int32_t __stdfix_sat_hk(const int32_t x)
Saturates an integer to 16 bits.
Definition stdfix-full-iso.h:622
static uint32_t __stdfix_round_u32(uint32_t x, int n)
This function rounds the input unsigned 32-bit integer to a number of bits, returning a 32-bit intege...
Definition stdfix-full-iso.h:1830
static int idivk(s1615 x, s1615 y)
Divides two accums giving an integer answer.
Definition stdfix-full-iso.h:1437
#define __I(x)
Cast to int.
Definition stdfix-full-iso.h:549
static int32_t __stdfix_ssub_hk(int32_t x, int32_t y)
Saturated subtraction of the underlying integer representations.
Definition stdfix-full-iso.h:843
static int_r_t bitsr(const s015 f)
Converts a fract into an integer.
Definition stdfix-full-iso.h:246
static int32_t __stdfix_sneg_hk(int32_t x)
Saturated negation of the underlying integer representations.
Definition stdfix-full-iso.h:854
int64_t int_lk_t
This is the integer type into which signed long accum can be converted.
Definition stdfix-full-iso.h:132
static unsigned int muliuk(unsigned int n, u1616 x)
Multiplies an unsigned integer by an unsigned accum giving an unsigned integer answer.
Definition stdfix-full-iso.h:1488
static int countlshk(s87 f)
This function counts the number of leading sign-bits of a short accum.
Definition stdfix-full-iso.h:2166
static uint32_t __stdfix_sadd_ulr(uint32_t x, uint32_t y)
Saturated addition of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1071
uint16_t uint_uhk_t
This is the unsigned integer type into which unsigned short accum can be converted.
Definition stdfix-full-iso.h:148
static uint32_t __stdfix_ssub_ur(uint32_t x, uint32_t y)
Saturated subtraction of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1058
static uint_ur_t bitsur(const u016 f)
Converts an unsigned fract into an integer.
Definition stdfix-full-iso.h:324
static int32_t __stdfix_sadd_hk(int32_t x, int32_t y)
Saturated addition of the underlying integer representations.
Definition stdfix-full-iso.h:831
static int countlsulk(u3232 f)
This function counts the number of leading zeros of an unsigned long accum.
Definition stdfix-full-iso.h:2301
static unsigned int diviur(unsigned int n, u016 x)
Divides an unsigned integer by an unsigned fract giving an unsigned integer answer.
Definition stdfix-full-iso.h:1518
static int32_t __stdfix_sadd_hr(int_hr_t x, int_hr_t y)
Saturated addition of the underlying integer representations.
Definition stdfix-full-iso.h:729
static u016 urdivi(unsigned int i, unsigned int j)
Divides two unsigned integers giving an unsigned fract answer.
Definition stdfix-full-iso.h:1569
static u016 urbits(const uint_ur_t n)
Converts an unsigned integer into an unsigned fract.
Definition stdfix-full-iso.h:485
static int32_t __stdfix_sneg_r(int32_t x)
Saturated negation of the underlying integer representations.
Definition stdfix-full-iso.h:786
int64_t __stdfix_sadd_lk(int64_t x, int64_t y)
Saturated addition of the underlying integer representations.
static uint_ulr_t bitsulr(const u032 f)
Converts an unsigned long fract into an integer.
Definition stdfix-full-iso.h:337
int64_t __stdfix_smul_lk(int64_t x, int64_t y)
Saturated multiplication of the underlying integer representations.
static s031 abslr(s031 f)
This function returns the absolute value of a long fract.
Definition stdfix-full-iso.h:1709
static uint64_t __stdfix_round_u64(uint64_t x, int n)
This function rounds the input unsigned 64-bit integer to a number of bits, returning a 64-bit intege...
Definition stdfix-full-iso.h:1849
static uint8_t __stdfix_round_u8(uint8_t x, int n)
This function rounds the input unsigned 8-bit integer to a number of bits, returning an 8-bit integer...
Definition stdfix-full-iso.h:1792
static u88 rounduhk(u88 f, int n)
This function rounds the input unsigned short accum to a number of bits, returning an unsigned short ...
Definition stdfix-full-iso.h:2061
int32_t int_k_t
This is the integer type into which signed accum can be converted.
Definition stdfix-full-iso.h:128
static int32_t __stdfix_sat_r(const int32_t x)
Saturates an integer to 16 bits.
Definition stdfix-full-iso.h:588
#define __ULI(x)
Cast to unsigned long int.
Definition stdfix-full-iso.h:563
static u032 roundulr(u032 f, int n)
This function rounds the input unsigned long fract to a number of bits, returning an unsigned long fr...
Definition stdfix-full-iso.h:2048
static s87 roundhk(s87 f, int n)
This function rounds the input short accum to a number of bits, returning a short accum.
Definition stdfix-full-iso.h:1983
long fract s031
An alternative name for the signed long fract type.
Definition stdfix-full-iso.h:178
static int32_t __stdfix_ssub_lr(int32_t x, int32_t y)
Saturated subtraction of the underlying integer representations.
Definition stdfix-full-iso.h:809
static s3231 lkdivi(long int i, long int j)
Divides two integers giving a long accum answer.
Definition stdfix-full-iso.h:1401
static uint32_t __stdfix_ssub_ulr(uint32_t x, uint32_t y)
Saturated subtraction of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1084
static unsigned long int idivulk(u3232 x, u3232 y)
Divides two unsigned long accums giving an unsigned long integer answer.
Definition stdfix-full-iso.h:1656
static uint32_t __stdfix_ssub_uk(uint32_t x, uint32_t y)
Saturated subtraction of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1136
static u1616 rounduk(u1616 f, int n)
This function rounds the input unsigned accum to a number of bits, returning an unsigned accum.
Definition stdfix-full-iso.h:2074
short accum s87
An alternative name for the signed short accum type.
Definition stdfix-full-iso.h:181
unsigned short accum u88
An alternative name for the unsigned short accum type.
Definition stdfix-full-iso.h:199
#define __LI(x)
Cast to long int.
Definition stdfix-full-iso.h:555
static int64_t __stdfix_round_s64(int64_t x, int n)
This function rounds the input signed 64-bit integer to a number of bits, returning a 64-bit integer.
Definition stdfix-full-iso.h:1925
accum s1615
An alternative name for the signed accum type.
Definition stdfix-full-iso.h:184
static u3232 ulkbits(const uint_ulk_t n)
Converts an unsigned integer into an unsigned long accum.
Definition stdfix-full-iso.h:537
static int32_t __stdfix_sneg_lr(int32_t x)
Saturated negation of the underlying integer representations.
Definition stdfix-full-iso.h:820
static int32_t __stdfix_smul_r(int32_t x, int32_t y)
Saturated multiplication of the underlying integer representations.
Definition stdfix-full-iso.h:947
static unsigned int idivur(u016 x, u016 y)
Divides two unsigned fracts giving an unsigned integer answer.
Definition stdfix-full-iso.h:1619
static s015 rbits(const int_r_t n)
Converts a signed integer into a signed fract.
Definition stdfix-full-iso.h:407
static int_hk_t bitshk(const s87 f)
Converts a short accum into an integer.
Definition stdfix-full-iso.h:272
static long int mulilr(long int n, s031 x)
Multiplies a long integer by a long fract giving an integer answer.
Definition stdfix-full-iso.h:1276
static unsigned long int diviulr(unsigned long int n, u032 x)
Divides a long unsigned integer by a long unsigned fract giving an unsigned integer answer.
Definition stdfix-full-iso.h:1531
static long int idivlr(s031 x, s031 y)
Divides two long fracts giving a long integer answer.
Definition stdfix-full-iso.h:1425
static u1616 ukbits(const uint_uk_t n)
Converts an unsigned integer into an unsigned accum.
Definition stdfix-full-iso.h:524
static uint32_t __stdfix_sat_uhk(const uint32_t x)
Saturates an unsigned integer to 16 bits.
Definition stdfix-full-iso.h:698
static int8_t __stdfix_round_s8(int8_t x, int n)
This function rounds the input signed 8-bit integer to a number of bits, returning an 8-bit integer.
Definition stdfix-full-iso.h:1868
static uint32_t __stdfix_smul_ur(uint32_t x, uint32_t y)
Saturated multiplication of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1182
static int32_t __stdfix_ssub_k(int32_t x, int32_t y)
Saturated subtraction of the underlying integer representations.
Definition stdfix-full-iso.h:881
static int countlsuhk(u88 f)
This function counts the number of leading zeros of an unsigned short accum.
Definition stdfix-full-iso.h:2267
static uint32_t __stdfix_sadd_uhr(uint32_t x, uint32_t y)
Saturated addition of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1019
static s07 hrbits(const int_hr_t n)
Converts a signed integer into a signed short fract.
Definition stdfix-full-iso.h:394
static s015 absr(s015 f)
This function returns the absolute value of a fract.
Definition stdfix-full-iso.h:1693
static s87 hkbits(const int_hk_t n)
Converts a signed integer into a signed short accum.
Definition stdfix-full-iso.h:433
static u3232 ulkdivi(unsigned long int i, unsigned long int j)
Divides two unsigned long integers giving an unsigned long accum answer.
Definition stdfix-full-iso.h:1607
unsigned long fract u032
An alternative name for the unsigned long fract type.
Definition stdfix-full-iso.h:196
uint64_t uint_ulk_t
This is the unsigned integer type into which unsigned long accum can be converted.
Definition stdfix-full-iso.h:156
static long int divilr(long int n, s031 x)
Divides a long integer by a long fract giving a long integer answer.
Definition stdfix-full-iso.h:1329
static s031 lrdivi(long int i, long int j)
Divides two integers giving a long fract answer.
Definition stdfix-full-iso.h:1377
static int32_t __stdfix_round_s32(int32_t x, int n)
This function rounds the input signed 32-bit integer to a number of bits, returning a 32-bit integer.
Definition stdfix-full-iso.h:1906
unsigned long accum u3232
An alternative name for the unsigned long accum type.
Definition stdfix-full-iso.h:205
static int_lk_t bitslk(const s3231 f)
Converts a long accum into an integer.
Definition stdfix-full-iso.h:298
#define __I32(x)
Cast to int32_t.
Definition stdfix-full-iso.h:551
static int32_t __stdfix_sadd_k(int32_t x, int32_t y)
Saturated addition of the underlying integer representations.
Definition stdfix-full-iso.h:865
static s1615 kdivi(int i, int j)
Divides two integers giving an accum answer.
Definition stdfix-full-iso.h:1389
static int countlslk(s3231 f)
This function counts the number of leading sign-bits of a long accum.
Definition stdfix-full-iso.h:2199
static s1615 kbits(const int_k_t n)
Converts a signed integer into a signed accum.
Definition stdfix-full-iso.h:446
static int32_t __stdfix_sat_lr(const int64_t x)
Saturates a 64-bit integer to 32-bits.
Definition stdfix-full-iso.h:605
#define __I64(x)
Cast to int64_t.
Definition stdfix-full-iso.h:553
static uint32_t __stdfix_sat_uk(const uint64_t x)
Saturates an unsigned 64-bit integer to 32 bits.
Definition stdfix-full-iso.h:712
static int idivr(s015 x, s015 y)
Divides two fracts giving an integer answer.
Definition stdfix-full-iso.h:1413
static uint32_t __stdfix_ssub_uhr(uint32_t x, uint32_t y)
Saturated subtraction of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1032
static s07 abshr(s07 f)
This function returns the absolute value of a short fract.
Definition stdfix-full-iso.h:1677
static uint32_t __stdfix_smul_uk(uint32_t x, uint32_t y)
Saturated multiplication of the underlying unsigned integer representations.
Definition stdfix-full-iso.h:1228
static int32_t __stdfix_sneg_hr(int_hr_t x)
Saturated negation of the underlying integer representations.
Definition stdfix-full-iso.h:752
static s015 rdivi(int i, int j)
Divides two integers giving a fract answer.
Definition stdfix-full-iso.h:1365
static uint32_t __stdfix_sat_uhr(const uint32_t x)
Saturates an unsigned integer to 8 bits.
Definition stdfix-full-iso.h:656
static int32_t __stdfix_smul_lr(int32_t x, int32_t y)
Saturated multiplication of the underlying integer representations.
Definition stdfix-full-iso.h:963
static s1615 roundk(s1615 f, int n)
This function rounds the input accum to a number of bits, returning an accum.
Definition stdfix-full-iso.h:1996