-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNumeric.h
34 lines (27 loc) · 1.3 KB
/
Numeric.h
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
//---------------------------------------------------------------------------//
// Copyright (C) 2008 Tyson Whitehead
//
// This code is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2, or (at
// your option) any later version.
//
//---------------------------------------------------------------------------//
#ifndef NUMERIC_H_INCLUDED
#define NUMERIC_H_INCLUDED
#include "Reduce.h"
#define _numeric_add(x,y,...) reduce_caseReduce2(numeric_add,x,y,__VA_ARGS__)
#define _numeric_subtract(x,y,...) reduce_caseReduce2(numeric_subtract,x,y,__VA_ARGS__)
#define _numeric_multiply(x,y,...) reduce_caseReduce2(numeric_multiply,x,y,__VA_ARGS__)
#define _numeric_absolute(x,...) reduce_caseReduce1(numeric_absolute,x,__VA_ARGS__)
#define _numeric_sign(x,...) reduce_caseReduce1(numeric_sign,x,__VA_ARGS__)
#define _numeric_negate(x,...) reduce_caseReduce1(numeric_negate,x,__VA_ARGS__)
#ifndef NUMERIC_QUALIFIED_ONLY
#define add numeric_add
#define subtract numeric_subtract
#define multiply numeric_multiply
#define absolute numeric_absolute
#define sign numeric_sign
#define negate numeric_negate
#endif // NUMERIC_QUALIFIED_ONLY
#endif // NUMERIC_H_INCLUDED