From 6dc70f79414ded94e88755755ffa1c1d16509d9d Mon Sep 17 00:00:00 2001 From: ntfrgl Date: Sun, 9 Aug 2015 00:06:32 +0200 Subject: Possible fix for #141 --- packages/base/src/Internal/C/lapack-aux.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'packages/base/src/Internal/C/lapack-aux.h') diff --git a/packages/base/src/Internal/C/lapack-aux.h b/packages/base/src/Internal/C/lapack-aux.h index b38ca7a..e0dd5f6 100644 --- a/packages/base/src/Internal/C/lapack-aux.h +++ b/packages/base/src/Internal/C/lapack-aux.h @@ -88,3 +88,24 @@ typedef short ftnlen; #define AT(m,i,j) (m##p[(i)*m##Xr + (j)*m##Xc]) #define TRAV(m,i,j) int i,j; for (i=0;i0) { + return m >=0 ? m : m+b; + } else { + return m <=0 ? m : m+b; + } +} + +inline +int64_t mod_l (int64_t a, int64_t b) { + int64_t m = a % b; + if (b>0) { + return m >=0 ? m : m+b; + } else { + return m <=0 ? m : m+b; + } +} -- cgit v1.2.3