-
Notifications
You must be signed in to change notification settings - Fork 2
/
math_tools.h
28 lines (24 loc) · 898 Bytes
/
math_tools.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
******************************************************************************
* File Name : math_tools.h
* Author : Xavier Halgand
* Date :
* Description :
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MATH_TOOLS_H
#define __MATH_TOOLS_H
/*-------------------------------------------------------*/
#include "constants.h"
#include <math.h>
#include <stdint.h>
/*-------------------------------------------------------*/
float approx_exp(float x);
float Lin2Exp(uint8_t val, float min, float max); // input val in 0 ... 127
float tanhXdX(float x);
float fastTanh(float var);
float softClipTwo(float in);
float fastTan(float x);
/*-------------------------------------------------------*/
#endif /* __MATH_TOOLS_H */