# Scalar API Quick Reference#

## Fixed-Point Scalar Ops#

Table 29 Fixed-Point Scalar Ops#

Function

Input Depth

Fractional Bits

Brief

s16_inverse()

16

0

$$x^{-1}$$

s32_inverse()

32

0

$$x^{-1}$$

32

31

$$\sin(x)$$

32

31

$$\tan(x)$$

q24_sin()

32

24

$$\sin(x)$$

q24_cos()

32

24

$$\cos(x)$$

q24_tan()

32

24

$$\tan(x)$$

q30_exp_small()

32

30

$$\exp(x)$$

q24_logistic()

32

24

$$\frac{1}{1+e^{-x}}$$

q24_logistic_fast()

32

24

$$\frac{1}{1+e^{-x}}$$

q30_powers()

32

30

$$(0,x,x^2,x^3,\dots)$$

u32_ceil_log2()

32

0

$$\lceil\log_2(x)\rceil$$

## IEEE 754 Float Ops#

Table 30 IEEE 754 Float Ops#

Function

Brief

f32_sin()

$$sin(x)$$

f32_cos()

$$cos(x)$$

f32_log2()

$$log_2(x)$$

f32_power_series()

Evaluate Power Series

f32_normA()

Normalized Form A

## Non-standard Scalar Float Ops#

Table 31 Non-standard Scalar Float Ops#

Function

Brief

float_s32_mul()

$$x \times y$$

$$x + y$$

float_s32_sub()

$$x - y$$

float_s32_div()

$$\frac{x}{y}$$

float_s32_abs()

$$\left|x\right|$$

float_s32_gt()

$$x > y$$

float_s32_gte()

$$x \ge y$$

float_s32_ema()

$$\alpha x + (1 - \alpha) y$$

float_s32_sqrt()

$$\sqrt{x}$$

float_s32_exp()

$$exp(x)$$

s16_mul()

$$x \times y$$

s32_sqrt()

$$\sqrt{x}$$

s32_mul()

$$x \times y$$

s32_odd_powers()

$$x, x^3, x^5, x^7, \dots$$

## Non-standard Complex Scalar Float Ops#

Table 32 Non-standard Complex Scalar Float Ops#

Function

Brief

float_complex_s16_mul()

$$x \times y$$

$$x + y$$

float_complex_s16_sub()

$$x - y$$

float_complex_s32_mul()

$$x \times y$$

$$x + y$$
$$x - y$$