webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Macros | Functions
mathops.h File Reference

Various math functions. More...

#include "arch.h"
#include "entcode.h"
#include "os_support.h"

Go to the source code of this file.

Macros

#define FRAC_MUL16(a, b)   ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15)
 
#define celt_maxabs32(x, len)   celt_maxabs16(x,len)
 
#define PI   3.141592653f
 
#define celt_sqrt(x)   ((float)sqrt(x))
 
#define celt_rsqrt(x)   (1.f/celt_sqrt(x))
 
#define celt_rsqrt_norm(x)   (celt_rsqrt(x))
 
#define celt_cos_norm(x)   ((float)cos((.5f*PI)*(x)))
 
#define celt_rcp(x)   (1.f/(x))
 
#define celt_div(a, b)   ((a)/(b))
 
#define frac_div32(a, b)   ((float)(a)/(b))
 
#define celt_log2(x)   ((float)(1.442695040888963387*log(x)))
 
#define celt_exp2(x)   ((float)exp(0.6931471805599453094*(x)))
 

Functions

unsigned isqrt32 (opus_uint32 _val)
 

Detailed Description

Various math functions.

Macro Definition Documentation

◆ celt_cos_norm

#define celt_cos_norm (   x)    ((float)cos((.5f*PI)*(x)))

◆ celt_div

#define celt_div (   a,
  b 
)    ((a)/(b))

◆ celt_exp2

#define celt_exp2 (   x)    ((float)exp(0.6931471805599453094*(x)))

◆ celt_log2

#define celt_log2 (   x)    ((float)(1.442695040888963387*log(x)))

◆ celt_maxabs32

#define celt_maxabs32 (   x,
  len 
)    celt_maxabs16(x,len)

◆ celt_rcp

#define celt_rcp (   x)    (1.f/(x))

◆ celt_rsqrt

#define celt_rsqrt (   x)    (1.f/celt_sqrt(x))

◆ celt_rsqrt_norm

#define celt_rsqrt_norm (   x)    (celt_rsqrt(x))

◆ celt_sqrt

#define celt_sqrt (   x)    ((float)sqrt(x))

◆ frac_div32

#define frac_div32 (   a,
  b 
)    ((float)(a)/(b))

◆ FRAC_MUL16

#define FRAC_MUL16 (   a,
  b 
)    ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15)

◆ PI

#define PI   3.141592653f

Function Documentation

◆ isqrt32()

unsigned isqrt32 ( opus_uint32  _val)