Tomasz Sowa
eaa19dd46a
void UInt::Mul3Big(const UInt<value_size> & ss2, UInt<value_size*2> & result) a new multiplication algorithm: Karatsuba multiplication, on a vector UInt<100> with all items different from zero this algorithm is faster about 3 times than Mul2Big(), and on a vector UInt<1000> with all items different from zero this algorithm is faster more than 5 times than Mul2Big() (measured on 32bit platform with GCC 4.3.3 with -O3 and -DTTMATH_RELEASE) added: uint MulFastest(const UInt<value_size> & ss2) void MulFastestBig(const UInt<value_size> & ss2, UInt<value_size*2> & result) those methods are trying to select the fastest multiplication algorithm changed: uint Mul(const UInt<value_size> & ss2, uint algorithm = 100) void MulBig(const UInt<value_size> & ss2, UInt<value_size*2> & result, uint algorithm = 100) those methods by default use MulFastest() and MulFastestBig() changed: changed a little Mul2Big() to cooperate with Mul3Big() changed: names of methods in macros TTMATH_LOG() added: uint AddVector(const uint * ss1, const uint * ss2, uint ss1_size, uint ss2_size, uint * result) uint SubVector(const uint * ss1, const uint * ss2, uint ss1_size, uint ss2_size, uint * result) three forms: asm x86, asm x86_64, no-asm those methods are used by the Karatsuba multiplication algorithm git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@148 e52654a7-88a9-db11-a3e9-0013d4bc506e |
||
---|---|---|
constgen | ||
samples | ||
tests | ||
ttmath | ||
CHANGELOG | ||
COPYRIGHT | ||
README | ||
doxygen.cfg |
README
TTMath - a bignum library for C++ TTMath is a small library which allows one to perform arithmetic operations with big unsigned integer, big signed integer and big floating point numbers. It provides standard mathematical operations like adding, subtracting, multiplying, dividing etc. With the library also goes a mathematical parser which helps you solving input formulas read directly from a user. TTMath is developed under the BSD licence which means that it is free for both personal and commercial use. The library has some technical limitations: * there are only two platforms that are supported: x86 and x86_64, * you can use this library only with the C++ programming language. The main goal of the library is to allow one to use big values in the same way as the standard types like int, float, etc. It does not need to be compiled first because the whole library is written as the C++ templates. This means only C++ developers can use this library and one thing they have to do is to use 'include' directive of the preprocessor. How big the values can be is set directly in the source code by the programmer. Author: Tomasz Sowa <t.sowa@ttmath.org> Project pages: http://www.ttmath.org http://sourceforge.net/projects/ttmath