#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
#include "types.h"
Go to the source code of this file.
◆ MATHEMATICS_DOUBLE_PRECISION
#define MATHEMATICS_DOUBLE_PRECISION 0.0000000001 |
◆ mathematics_equals()
Verify that 2 numbers are equal.
- Parameters
-
- Returns
- bool
- Since
- v1.0.0
◆ mathematics_absolute_value()
uint64_t mathematics_absolute_value |
( |
const int64_t |
number | ) |
|
Get the absolute value of a number.
- Parameters
-
- Returns
- uint64_t
- Since
- v1.0.0
◆ mathematics_pow()
uint64_t mathematics_pow |
( |
uint64_t |
base, |
|
|
uint64_t |
exponent |
|
) |
| |
Calculates the power of a number.
- Parameters
-
- Returns
- uint64_t
- Since
- v1.0.0
◆ mathematics_root()
Calculates the nth root of a number.
- Parameters
-
- Returns
- float64_t
- Since
- v1.0.0
◆ mathematics_square_root()
Calculates the square root of a number using Heron's method.
- Parameters
-
- Returns
- float64_t
- Since
- v1.0.0
◆ mathematics_factorial()
uint64_t mathematics_factorial |
( |
uint64_t |
number | ) |
|
Calculates the factorial of a number.
- Parameters
-
- Returns
- uint64_t
- Since
- v1.0.0
◆ mathematics_opposite()
int64_t mathematics_opposite |
( |
int64_t |
number | ) |
|
Calulcates the opposite number (additive inverse).
- Parameters
-
- Returns
- int64_t
int64_t mathematics_opposite(int64_t number)
Calulcates the opposite number (additive inverse).
- Since
- v4.3.0
◆ mathematics_max()
int64_t mathematics_max |
( |
int64_t |
number1, |
|
|
int64_t |
number2 |
|
) |
| |
Returns the largest number between 2 numbers.
- Parameters
-
- Returns
- int64_t
- Since
- v4.3.0
◆ mathematics_max_values()
int64_t mathematics_max_values |
( |
int64_t * |
values, |
|
|
size_t |
values_length |
|
) |
| |
Returns the largest number between multiple numbers. If the array is empty, returns 0.
- Parameters
-
- Returns
- int64_t
- Since
- v4.3.0
◆ mathematics_min()
int64_t mathematics_min |
( |
int64_t |
number1, |
|
|
int64_t |
number2 |
|
) |
| |
Returns the smallest number between 2 numbers.
- Parameters
-
- Returns
- int64_t
- Since
- v4.3.0
◆ mathematics_min_values()
int64_t mathematics_min_values |
( |
int64_t * |
values, |
|
|
size_t |
values_length |
|
) |
| |
Returns the smallest number between multiple numbers. If the array is empty, returns 0.
- Parameters
-
- Returns
- int64_t
- Since
- v4.3.0