P99
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros
Preprocessor arithmetic operations

Preprocessor macros that perform simple arithmetic on decimal arguments. More...

+ Collaboration diagram for Preprocessor arithmetic operations:

Macros

#define P99_ADD(_0, _1)
 add two decimal numbers More...
 
#define P99_CDIM(NAME,...)   P00_CDIM(P99_NARG(__VA_ARGS__), NAME, __VA_ARGS__)
 Compute an absolute index in a multidimensional array in the same way as C. More...
 
#define P99_DIV(A, B)   P99_CHS(A, P99_FOR(B, 32, P00_SEQ, P00_IDI, P00_ALL_ONES()))
 Generate the quotient of non-negative decimal numbers A and B at preprocessing time. More...
 
#define P99_EVAL(EDEC)   P99_PASTE2(P00_dec_eval_, EDEC)
 evaluate the result of one of the arithmetic preprocessor More...
 
#define P99_MINUS(_0, _1)   P00_MINUS(_0, _1, P99_IS_EQ(_0, _1), P99_IS_EQ_0(_0), P99_IS_EQ_0(_1))
 substract two decimal numbers More...
 
#define P99_MOD(A, B)   P00_MOD(A, P99_DUPL(32, P99_SELS(B, P00_ASCENDING())))
 Generate the modulus of non-negative decimal numbers A and B at preprocessing time. More...
 
#define P99_MUL(A, B)   P99_PASTE3(P00_MUL_, P99_IS_EQ_0(A), P99_IS_EQ_0(B))(A, B)
 Generate the product of non-negative decimal numbers A and B at preprocessing time. More...
 
#define P99_PRED(N)   P00_PRED(N)
 Macro that expands to the predecessor of decimal constant N. More...
 

Detailed Description

Preprocessor macros that perform simple arithmetic on decimal arguments.

These are only implemented for small numbers, currently the limit is somewhere around P99_MAX_NUMBER