summaryrefslogtreecommitdiff
path: root/support/dktools/libdk4ma.dox
blob: 3aa7bdc989c8309399279fafd0d8cc00b2946b92 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**	@page	libdk4ma	libdk4ma

@section	mathop	Mathematical operations

Mathematical operations on integer numbers with overflow test and
protection against division by 0 for different sizes
(addition - add, substraction - sub, multiplication - mul,
division - div, absolute value - abs):

Data type | Header | Example function
:-------: | :----: | :---------------
char | dk4maac.h | dk4ma_char_add()
unsigned char | dk4maauc.h | dk4ma_uchar_add()
short | dk4maas.h | dk4ma_short_add()
unsigned short | dk4maaus.h | dk4ma_ushort_add()
int | dk4maai.h | dk4ma_int_add()
unsigned int | dk4maaui.h | dk4ma_uint_add()
long | dk4maal.h | dk4ma_long_add()
unsigned long | dk4maaul.h | dk4ma_ulong_add()
size_t | dk4maasz.h | dk4ma_size_t_add()
long long | dk4maall.h | dk4ma_ll_add()
unsigned long long | dk4maalu.h | dk4ma_ull_add()
intmax_t | dk4maami.h | dk4ma_intmax_t_add()
uintmax_t | dk4maamu.h | dk4ma_uintmax_t_add()
dk4_im_t | dk4maadi.h | dk4ma_im_add()
dk4_um_t | dk4maadu.h | dk4ma_um_add()

@section	mathcomp	Comparisons

Comparison between signed and unsigned integers for different sizes:

Data type | Header | Function
:-------: | :----: | :-------
signed char / unsigned char | dk4macc.h | dk4ma_char_compare()
short / unsigned short | dk4macs.h | dk4ma_short_compare()
int / unsigned | dk4maci.h | dk4ma_int_compare()
long / unsigned long | dk4macl.h | dk4ma_long_compare()
long long / unsigned long long | dk4macll.h | dk4ma_long_long_compare()
intmax_t / uintmax_t | dk4macm.h | dk4ma_intmax_t_compare()
dk4_im_t / dk4_um_t | dk4macd.h | dk4ma_im_compare()

*/