Files | |
file | eg_nummacros.h |
This file provide the user interface and function definitions for general number utilities. | |
Defines | |
#define | EGabs(var) |
a general macro to return the absolute value of the given variable | |
#define | EGmax(a, b) |
given two variables (of the same type, and of some predefined type) return the maximum value among the two of them. | |
#define | EGmin(a, b) |
given two variables (of the same type, and of some predefined type) return the minimum value among the two of them. | |
#define | EGswap(N1, N2, Ntmp) |
Given tree numbers N1, N2 and Ntmp, swap values of N1 and N2 using Ntmp as a temporal number. The variables should be of some primitive type of C for this macro to work. |
|
Value: ({\ const typeof(var) __EGav = (var);\ (__EGav < 0) ? -__EGav : __EGav;})
Definition at line 80 of file eg_nummacros.h. |
|
Value: ({\ const typeof(a) __EGma = (a);\ const typeof(b) __EGmb = (b);\ (__EGma > __EGmb ? __EGma : __EGmb);})
Definition at line 61 of file eg_nummacros.h. |
|
Value: ({\ const typeof(a) __EGma = (a);\ const typeof(b) __EGmb = (b);\ (__EGma < __EGmb ? __EGma : __EGmb);})
Definition at line 69 of file eg_nummacros.h. |
|
Value: do{\ Ntmp = N1;\ N1 = N2;\ N2 = Ntmp;} while(0)
Definition at line 53 of file eg_nummacros.h. |