From 31b8c242bd69e7e90f0738b28f63647636edcdfd Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sun, 20 Sep 2009 20:41:11 +0000 Subject: [PATCH] changed: if TTMATH_DEBUG_LOG is defined then TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE is always 3 (regardless of the compiler) git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@202 e52654a7-88a9-db11-a3e9-0013d4bc506e --- ttmath/ttmathtypes.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ttmath/ttmathtypes.h b/ttmath/ttmathtypes.h index 8bbb464..bbbb2ba 100644 --- a/ttmath/ttmathtypes.h +++ b/ttmath/ttmathtypes.h @@ -273,14 +273,18 @@ namespace ttmath if the size of a vector is smaller than TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE the Karatsuba algorithm will use standard schoolbook multiplication */ -#ifdef __GNUC__ -#define TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE 3 +#ifdef TTMATH_DEBUG_LOG + // if TTMATH_DEBUG_LOG is defined then we should use the same size regardless of the compiler + #define TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE 3 #else -#define TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE 5 + #ifdef __GNUC__ + #define TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE 3 + #else + #define TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE 5 + #endif #endif - /*! this is a special value used when calculating the Gamma(x) function if x is greater than this value then the Gamma(x) will be calculated using