Turnstone Operating System
Loading...
Searching...
No Matches
math.64.c File Reference

Math library for 64-bit floating point numbers. More...

#include <math.h>

Macros

#define MATH_TRESHOLD   0.00000000000001L
 

Functions

 MODULE ("turnstone.lib")
 
float64_t math_sin_approx (float64_t number)
 calculates approx for sin of number More...
 
int64_t math_ceil (float64_t num)
 ceil of given float number More...
 
int64_t math_floor (float64_t num)
 floor of given float number More...
 
float64_t math_power (float64_t base, float64_t p)
 power base with p More...
 
float64_t math_exp (float64_t number)
 calculates exp^number More...
 
float64_t math_log (float64_t number)
 calculates log given number at base exp More...
 
float64_t math_root (float64_t number, float64_t root)
 calculates root of given number at root More...
 
float64_t math_antilog (float64_t power, float64_t base)
 calculates antilog value More...
 
float64_t math_sin (float64_t number)
 calculates sin of x More...
 
boolean_t math_isnan (float64_t number)
 checks if given number is nan More...
 
boolean_t math_isinf (float64_t number)
 checks if given number is infinite More...
 

Detailed Description

Math library for 64-bit floating point numbers.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ math_antilog()

float64_t math_antilog ( float64_t  power,
float64_t  base 
)

calculates antilog value

Parameters
[in]powergiven number
[in]baselog base
Returns
antilog value base^power

◆ math_ceil()

int64_t math_ceil ( float64_t  num)

ceil of given float number

Parameters
[in]numgiven float number
Returns
ceiled value

◆ math_exp()

float64_t math_exp ( float64_t  number)

calculates exp^number

Parameters
[in]numbernumber to calculate
Returns
exp^number

◆ math_floor()

int64_t math_floor ( float64_t  num)

floor of given float number

Parameters
[in]numgiven float number
Returns
floored value

◆ math_isinf()

boolean_t math_isinf ( float64_t  number)

checks if given number is infinite

Parameters
[in]numbernumber for calculation
Returns
true if number is infinite

◆ math_isnan()

boolean_t math_isnan ( float64_t  number)

checks if given number is nan

Parameters
[in]numbernumber for calculation
Returns
true if number is nan

◆ math_log()

float64_t math_log ( float64_t  number)

calculates log given number at base exp

Parameters
[in]numbernumber to calculate
Returns
log value at base exp

◆ math_power()

float64_t math_power ( float64_t  base,
float64_t  p 
)

power base with p

Parameters
[in]basethe base
[in]pthe power
Returns
base^p with fast power algorithm

◆ math_root()

float64_t math_root ( float64_t  number,
float64_t  root 
)

calculates root of given number at root

Parameters
[in]numbergiven number
[in]rootroot to calculate
Returns
root result

◆ math_sin()

float64_t math_sin ( float64_t  number)

calculates sin of x

Parameters
[in]numbernumber for calculation
Returns
sin(number)

◆ math_sin_approx()

float64_t math_sin_approx ( float64_t  number)

calculates approx for sin of number

Parameters
[in]numbernumber to calculate
Returns
sin(number)