aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-25 16:56:05 +0100
committerMattias Andrée <maandree@kth.se>2017-01-25 16:56:05 +0100
commit2debbbe6e70b66357fa510850b57c47406a87249 (patch)
treeffd945e7d9d88d265ae97ea0da8932f541180014 /src
parentUpdate todo (diff)
downloadblind-2debbbe6e70b66357fa510850b57c47406a87249.tar.gz
blind-2debbbe6e70b66357fa510850b57c47406a87249.tar.bz2
blind-2debbbe6e70b66357fa510850b57c47406a87249.tar.xz
blind-arithm: add abs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/blind-arithm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blind-arithm.c b/src/blind-arithm.c
index 2ac1652..bc30bee 100644
--- a/src/blind-arithm.c
+++ b/src/blind-arithm.c
@@ -26,7 +26,8 @@ typedef void (*process_func)(struct stream *left, struct stream *right, size_t n
X(exp, *lh = pow(*lh, rh))\
X(log, *lh = log(*lh) / log(rh))\
X(min, *lh = *lh < rh ? *lh : rh)\
- X(max, *lh = *lh > rh ? *lh : rh)
+ X(max, *lh = *lh > rh ? *lh : rh)\
+ X(abs, *lh = fabs(*lh - rh) + rh)
#define X(NAME, ALGO)\
static void\