From 2debbbe6e70b66357fa510850b57c47406a87249 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 25 Jan 2017 16:56:05 +0100 Subject: blind-arithm: add abs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blind-arithm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/blind-arithm.c') 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\ -- cgit v1.2.3-70-g09d2