AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
fp_log.h
Go to the documentation of this file.
1/*************************************************************************/
37#ifndef FP_LOG_H
38#define FP_LOG_H
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/*!***************************************************************************
44 * @addtogroup argus_fp
45 * @{
46 *****************************************************************************/
47
48#include "fp_def.h"
49
50/*!***************************************************************************
51 * @brief Calculates the natural logarithm (base e) of an fixed point number.
52 *
53 * @details Calculates y = ln(x) = log_e(x) in fixed point representation.
54 *
55 * Note that the result might not be 100 % accurate and might contain
56 * a small error!
57 *
58 * @see https://www.quinapalus.com/efunc.html
59 *
60 * @param x The input parameter in unsigned fixed point format Q15.16.
61 * @return Result y = ln(x) in the UQ16.16 format.
62 *****************************************************************************/
64
66#ifdef __cplusplus
67} // extern "C"
68#endif
69#endif /* FP_DIV_H */
This file is part of the AFBR-S50 API.
q15_16_t fp_log16(uq16_16_t x)
Calculates the natural logarithm (base e) of an fixed point number.
uint32_t uq16_16_t
Unsigned fixed point number: UQ16.16.
Definition fp_def.h:425
int32_t q15_16_t
Signed fixed point number: Q15.16.
Definition fp_def.h:515