PandA-2024.02
Functions | Variables
fixedptc.c File Reference
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include "fixedptc.h"
Include dependency graph for fixedptc.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

fixedpt fixedpt_mul (fixedpt A, fixedpt B)
 
fixedpt fixedpt_div (fixedpt A, fixedpt B)
 
void fixedpt_str (fixedpt A, char *str, int max_dec)
 Convert the given fixedpt number to a decimal string. More...
 
char * fixedpt_cstr (const fixedpt A, const int max_dec)
 
fixedpt fixedpt_sqrt (fixedpt A)
 
fixedpt fixedpt_sin (fixedpt fp)
 
fixedpt fixedpt_cos (fixedpt A)
 
fixedpt fixedpt_tan (fixedpt A)
 
fixedpt fixedpt_exp (fixedpt fp)
 
fixedpt fixedpt_ln (fixedpt x)
 
fixedpt fixedpt_log (fixedpt x, fixedpt base)
 
fixedpt fixedpt_pow (fixedpt n, fixedpt exp)
 

Variables

char str [25]
 

Function Documentation

◆ fixedpt_cos()

fixedpt fixedpt_cos ( fixedpt  A)

Definition at line 175 of file fixedptc.c.

References FIXEDPT_HALF_PI, and fixedpt_sin().

Here is the call graph for this function:

◆ fixedpt_cstr()

char* fixedpt_cstr ( const fixedpt  A,
const int  max_dec 
)

Definition at line 94 of file fixedptc.c.

References fixedpt_str(), and str.

Here is the call graph for this function:

◆ fixedpt_div()

fixedpt fixedpt_div ( fixedpt  A,
fixedpt  B 
)

Definition at line 20 of file fixedptc.c.

References FIXEDPT_FBITS.

◆ fixedpt_exp()

fixedpt fixedpt_exp ( fixedpt  fp)

Definition at line 191 of file fixedptc.c.

References fixedpt_abs, fixedpt_div(), FIXEDPT_FBITS, FIXEDPT_FMASK, fixedpt_mul(), FIXEDPT_ONE, FIXEDPT_ONE_HALF, fixedpt_rconst, FIXEDPT_TWO, k, and R.

Here is the call graph for this function:

◆ fixedpt_ln()

fixedpt fixedpt_ln ( fixedpt  x)

Definition at line 279 of file fixedptc.c.

References fixedpt_div(), FIXEDPT_FBITS, fixedpt_mul(), FIXEDPT_ONE, fixedpt_rconst, FIXEDPT_TWO, R, and x.

Here is the call graph for this function:

◆ fixedpt_log()

fixedpt fixedpt_log ( fixedpt  x,
fixedpt  base 
)

Definition at line 320 of file fixedptc.c.

References fixedpt_div(), and fixedpt_ln().

Here is the call graph for this function:

◆ fixedpt_mul()

fixedpt fixedpt_mul ( fixedpt  A,
fixedpt  B 
)

Definition at line 12 of file fixedptc.c.

References FIXEDPT_FBITS.

◆ fixedpt_pow()

fixedpt fixedpt_pow ( fixedpt  n,
fixedpt  exp 
)

Definition at line 328 of file fixedptc.c.

References fixedpt_exp(), fixedpt_ln(), fixedpt_mul(), and FIXEDPT_ONE.

Here is the call graph for this function:

◆ fixedpt_sin()

fixedpt fixedpt_sin ( fixedpt  fp)

Definition at line 141 of file fixedptc.c.

References FIXEDPT_HALF_PI, fixedpt_mul(), FIXEDPT_ONE, FIXEDPT_PI, fixedpt_rconst, result, and sign.

Here is the call graph for this function:

◆ fixedpt_sqrt()

fixedpt fixedpt_sqrt ( fixedpt  A)

Definition at line 104 of file fixedptc.c.

References A, fixedpt_div(), FIXEDPT_FBITS, and FIXEDPT_ONE.

Here is the call graph for this function:

◆ fixedpt_str()

void fixedpt_str ( fixedpt  A,
char *  str,
int  max_dec 
)

Convert the given fixedpt number to a decimal string.

The max_dec argument specifies how many decimal digits to the right of the decimal point to generate. If set to -1, the "default" number of decimal digits will be used (2 for 32-bit fixedpt width, 10 for 64-bit fixedpt width); If set to -2, "all" of the digits will be returned, meaning there will be invalid, bogus digits outside the specified precisions.

Definition at line 40 of file fixedptc.c.

References FIXEDPT_BITS, fixedpt_fracpart, fixedpt_toint, and FIXEDPT_WBITS.

◆ fixedpt_tan()

fixedpt fixedpt_tan ( fixedpt  A)

Definition at line 183 of file fixedptc.c.

References fixedpt_cos(), fixedpt_div(), and fixedpt_sin().

Here is the call graph for this function:

Variable Documentation

◆ str

char str[25]

Definition at line 8 of file fixedptc.c.


Generated on Mon Feb 12 2024 13:03:08 for PandA-2024.02 by doxygen 1.8.13