Sticky Revision: |

Revision

Modified

Diff to previous 1228

in ASin() and Gamma() there is used SetZeroNan() to suppress a warning about an uninitialized variable (for gcc)

Revision

Modified

Diff to previous 1227

removed: white characters from tests2/Makefile

Revision

Modified

Diff to previous 1226

updated tests2 output for big_64_64 (tests2/big_64_64.expected)

Revision

Modified

Diff to previous 1225

fixed: in Parser: there was an error returned when we parsed a string which at the end had a percentage operator e.g. "10+20%"

Revision

Modified

Diff to previous 1224

added: some tests for Big<> and Parser<> classes (tests2 directory)

Revision

Modified

Diff to previous 1198

updated doxygen.cfg (clear config generated from 1.8.15 version)

Revision

Modified

Diff to previous 1197

updated CHANGELOG

Revision

Modified

Diff to previous 1189

fixed: cannot compile on MS Windows when compiling with GCC (Mingw) for 64 bit platform: incorrect size of ttmath::uint and ::sint were used they were 'long' but 'long' is a 32bit type on Windows

Revision

Modified

Diff to previous 1137

fixed: a crash in Big::Add() (buffer overflow) there was an offset calculated from Int type by using Abs() method and a carry was not checked (if there is a carry we should not make addition -- the argument is too small) this had no impact on calculated values because there was a crash (bus error) immediately following program could crash (64bit): typedef ttmath::Big<1, 8> MyBig; ttmath::Parser<MyBig> parser; parser.Parse("2^(2^63) + 1"); fixed: similar problems were in methods Big::BitAnd() Big::BitOr() and Big::BitXor() (bitwise operations) and they could return incorrect values

Revision

Modified

Diff to previous 1054

some work in the parser and refactoring added a new math operator: assign now we can assign a value to a variable (not finished yet)

Revision

Modified

Diff to previous 1053

changed: commentaries to be more doxygen friendly

Revision

Modified

Diff to previous 1052

changed: commentaries to be more doxygen friendly changed: put block characters {...} is some places

Revision

Modified

Diff to previous 1051

added: makerelease.sh script to generate the source package tarball

Revision

Modified

Diff to previous 1050

- changed info in headers in source files: (new) BSD licence -> 3-Clause BSD Licence - added svn:ignore in some places

Revision

Modified

Diff to previous 1049

changed: some return values has been cleaned in ttmathuint.h (eclipse builtin parser reported errors but actually the code was correct)

Revision

Modified

Diff to previous 1047

changed: in Parser: the last commit has been changed to: oper.erase(oper.begin() + oper.size() - 1) because oper.pop_back() is available from c++11

Revision

Modified

Diff to previous 1046

changed: in Parser: oper.erase( --oper.end() ) changed to oper.pop_back() to allow use of the STL port (reported on the ttmath forum by Sebo)

Revision

Modified

Diff to previous 1045

fixed: in Object::GetValueAndParam() there was value.empty() used instead of value.clear()

Revision

Modified

Diff to previous 1044

changed: changed code in some places to remove warnings generated by Visual Studio added: file win64_assemble.bat to compile (assemble) *.asm file for Win64

Revision

Modified

Diff to previous 1043

updated: CHANGELOG, COPYRIGHT, doxygen.cfg added: directory 'res' with logos added: empty directory 'doc'

Revision

Modified

Diff to previous 1042

changed: get rid of some warnings generated by gcc and clang

Revision

Modified

Diff to previous 997

fixed: in x86_64 asm code (for Win64) there were in some places the esp register used, there should be rsp used instead (reported by Villi on the tttmath forum)

Revision

Modified

Diff to previous 450

added: CMakeLists.txt files for building samples by using cmake system submitted by Mateusz Loskot <mateusz at loskot dot net>

Revision

Modified

Diff to previous 441

fixed: in Parser: in method SetDegRadGrad(int angle) there is incorrectly use || operator (the && shoud be used) reported by heby on the ttmath forum

Revision

Modified

Diff to previous 438

removed: some warning messages generated by GCC from ttmathuint.h (Mul3Big3)

Revision

Modified

Diff to previous 437

corrected: the date in CHANGELOG (2012.12->2012.11)

Revision

Modified

Diff to previous 436

tagging version 0.9.3 of the ttmath library

Revision

Modified

Diff to previous 435

added: some pragmas for the clang compiler: #pragma clang diagnostic ignored "-Wtautological-compare" to get rid off some warning messages changed: changing version number to 0.9.3 release

Revision

Modified

Diff to previous 381

fixed: in Big::FromDouble(double value) (32 bit version) buffer overflow in referencing to UInt<2> (instead of m.table[2] should be m.table[0]) this was used when: E=0 and F is nonzero (double "unnormalized" values) it produced incorrect mantissa (on about 8th decimal digit up)

Revision

Modified

Diff to previous 342

added: ttmath/ttmathdec.h starting work on a Decimal template type

Revision

Modified

Diff to previous 340

changed: Big::FromString_ReadPartAfterComma() now we're reading the all part as integer and at the end we're dividing it by (base ^ how_many_digits_there_were) it's faster and should be a little accurate in some cases

Revision

Modified

Diff to previous 338

changed: UInt::ToString() had O(n^2) complexity where n was the number of digits to print now it has O(n)

Revision

Modified

Diff to previous 325

added: option 'group_digits' to Conv struct you can set how many digits should be grouped

Revision

Modified

Diff to previous 324

changed: small improvements in UInt::Pow() and Big::Pow()

Revision

Modified

Diff to previous 321

added: Parser::InitCGamma() initializing coefficients used when calculating the gamma (or factorial) function this speed up the next calculations you don't have to call this method explicitly these coefficients will be calculated when needed

Revision

Modified

Diff to previous 320

tagging version 0.9.2 of the ttmath library

Revision

Modified

Diff to previous 319

changing version number to 0.9.2 release

Revision

Modified

Diff to previous 318

added TTMATH_LOG to UInt::FromUInt(ulint n)

Revision

Modified

Diff to previous 317

fixed: Int::ToUInt(unsigned int & result) wrong carry was returned

Revision

Modified

Diff to previous 316

added some missing methods: ToUInt, ToInt, FromUInt, FromInt in Big<> class

Revision

Modified

Diff to previous 315

fixed: Big::ToDouble(double &) set always +INF (infinity) when the value was too large (even for negative values) (it should set -INF in such a case) added: some missing methods for converting for UInt<>, Int<> and Big<> classes: uint ToUInt() sint ToInt() ToUInt(uint32_t &) ToInt(uint32_t &) ToInt(int32_t &) ToUInt(uint64_t &) ToInt(uint64_t &) ToInt(int64_t &) FromUInt(uint32_t &) FromInt(uint32_t &) FromInt(int32_t &) FromUInt(uint64_t &) FromInt(uint64_t &) FromInt(int64_t &) and appropriate constructors and operators *** version for 64 bit platforms are not tested yet *** added: double Big::ToDouble() /there was only Big::ToDouble(double &) / uint Big::ToFloat(float &) float Big::ToFloat()

Revision

Modified

Diff to previous 314

added: some missing methods: ::FromUInt ::FromInt now ::FromInt can be used in place of ::FromUint sample: UInt<1> a; a.FromInt(10); // previous was only: a.FromUInt(10) changed: std::string Big::ToString(uint base = 10) const std::wstring Big::ToWString(uint base = 10) const can take optional parameter (base)

Revision

Modified

Diff to previous 313

removed: macro TTMATH_REFERENCE_ASSERT from all methods from public interface

Revision

Modified

Diff to previous 312

in Big::ToString_CreateNewMantissaTryExponent(): ToString_BaseRound can be called only for non integer values

Revision

Modified

Diff to previous 311

fixed: Big::ToString method in some cases when in the output string the exponent should be equal zero the method changes the exponent to one so the last digit from the mantissa was lost sample: Big<1,1> a; a.info = 0; a.mantissa = 2147483649u; // (bin) 10000000000000000000000000000001 // first and last bit in the mantissa is set a.exponent = 0; std::cout << a << std::endl; priovious result: 2147483640 it was treated as 214748364e+1 also the method has been a little improved

Revision

Modified

Diff to previous 310

added: on 32bit platforms: uint UInt::FromUInt(uint64_t n) uint Int::FromInt(int64_t n) void Big::FromUInt(uint64_t n) void Big::FromInt(int64_t n) and appropriate constructors and operators added: TTMATH_FORCEASM macro asm version of the library is available by default only for: x86 and amd64 platforms and for Microsoft Visual and GCC compilers, but you can force using asm version (the same asm as for Microsoft Visual) by defining TTMATH_FORCEASM macro you have to be sure that your compiler accept such an asm format

Revision

Modified

Diff to previous 309

added: Big::operator++() Big::operator++(int) Big::operator--() Big::operator--(int) Big::AddOne() Big::SubOne() changed: Big::SetOne() a little faster now

Revision

Modified

Diff to previous 304

fixed: TTMATH_DEBUG_LOG has generated different carry-flags in UInt<> (when TTMATH_NOASM was used) fixed: some GCC warnings about uninitialized variables added: macro TTMATH_BIG_DEFAULT_CLEAR when defined the default constructor from Big<> clears its mantissa and exponent Big<1, 2> var; var.mantissa and var.exponent will be set to zero (but var has the NaN flag set too - it is not zero value, this is mainly for debug purposes) added: Big::SetZeroNan() this method sets NaN flag (Not a Number) also clears the mantissa and exponent (similarly as it would be a zero value)

Revision

Modified

Diff to previous 303

added: bool UInt::IsOnlyTheHighestBitSet() bool UInt::IsOnlyTheLowestBitSet() returning true if only the highest/lowest bit is set added: uint Int::MulInt(sint ss2) added: void UInt::Swap(UInt<value_size> & ss2) void Big::Swap(UInt<value_size> & ss2) method for swapping this for an argument changed: small optimization in Big::Sub() changed: now asm version is available only on x86 and amd64 (and only for GCC and MS VC compilers) removed: macro TTMATH_RELEASE for debug version define TTMATH_DEBUG macro TTMATH_DEBUG is also automatically defined when DEBUG or _DEBUG is set

Revision

Modified

Diff to previous 302

fixed: Big::Add sometimes incorrectly rounded the last bit from mantissa (when exp_offset == mantissa_size_in_bits ) the rounding_up was always false

Revision

Modified

Diff to previous 301

fixed: Big::BigAnd() Big::BigOr() Big::BigXor() should have set NaN when the argument was negative (they only returned 2) added: some missing operators UInt::operator~() /* bitwise neg */ UInt::operator&() /* bitwise and */ UInt::operator&=() UInt::operator|() /* bitwise or */ UInt::operator|=() UInt::operator^() /* bitwise xor */ UInt::operator^=() Big::operator&() Big::operator&=() Big::operator|() Big::operator|=() Big::operator^() Big::operator^=() for Big<> we do not define bitwise neg

Revision

Modified

Diff to previous 294

fixed: recurrence calling in Big::FromString(const std::string &, uint, const wchar_t **, bool *) it should have the signature: Big::FromString(const std::string &, uint, const char **, bool *)

Revision

Modified

Diff to previous 287

added: macro TTMATH_DONT_USE_WCHAR if defined then the library does not use wide characters (wchar_t, std::wstring, ...) this is a workaround for some compilers

Revision

Modified

Diff to previous 286

tagging version 0.9.1 of the ttmath library

Revision

Modified

Diff to previous 285

changed: version of the library: 0.9.1 now

Revision

Modified

Diff to previous 284

added: to samples: big2.cpp with TTMATH_BITS() macro

Revision

Modified

Diff to previous 283

the half-to-even rounding was turned off (some 'return' statement left)

Revision

Modified

Diff to previous 277

removed: from Big::ToString() the feature with calculating how many valid digits there are after the comma operator this was not correctly calculated - sometimes gives unexpected results, e.g. 0.5/2/2=0.125 (only one bit in the mantissa) gives 0.1 as the result changed: cosmetic changes in Big::Add()

Revision

Modified

Diff to previous 275

removed: from parser: SetSmallToZero(bool zero) this was actually a bad feature

Revision

Modified

Diff to previous 274

added: static sint UInt<value_size>::FindLowestBitInWord(uint x) (asm_vc_32, asm_gcc_32, no_asm, and intrinsic for vc64)

Revision

Modified

Diff to previous 273

fixed: in Big::ToString_CreateNewMantissaAndExponent() changed the formula: new_exp_ = [log base (2^exponent)] + 1 now the part '+ 1' is only made when the logarithm is positive and with fraction if the value is negative we can only skip the fraction, previously we lost some last digits from the new mantissa Consider this binary value (32 bit mantissa): (bin)1.0000000000000000000000000000011 previously ToString() gave 1, now we have: 1.000000001

Revision

Modified

Diff to previous 264

fixed: added in the parser: operator's associativity operator ^ (powering) is right-associative: sample: 2^3^4 is equal 2^(3^4) and it is: 2.41e+24 previously was: 2^3^4 = (2^3)^4 = 4096

Revision

Modified

Diff to previous 263

fixed: I have forgotten to remove rounding down from division (Big::div)

Revision

Modified

Diff to previous 262

added: to Big::Add Big::Sub Big::Mul Big::Div second parameter 'bool round = true' the rounding is made if it is true changed: in Big::ToString_CreateNewMantissaAndExponent() we should use dividing without rounding consider this 32 bit binary value: 1.1111111111111111111111111111111 previous the result from converting (to the base 10) was equal 2 now is 1.999999

Revision

Modified

Diff to previous 259

fixed: Big::Add() should make the half-to-even rounding by analizing the old ss2 parameter, and when it does substraction too added: UInt::AreFirstBitsZero(uint bits) returning true if first bits are cleared

Revision

Modified

Diff to previous 258

fixed: base rounding in Big::ToString if the result were integer we shoud not round the value 3.0001 should be 3.0001 and 2.9999 should be 2.9999

Revision

Modified

Diff to previous 256

added: IEEE 754 half-to-even rounding (bankers' rounding) to the following floating point algorithms: Big::Add Big::Sub Big::Mul Big::Div

Revision

Modified

Diff to previous 255

fixed: the parser didn't use characters for changing the base (# and &) those characters were skipped (this bug was introduced in 0.9.0) added: to Big::ToString() - additional rounding when conv.base_round is used if the value is not an integer we calculate how many valid digits there are after the comma operator (in conv.base radix) and then we skipped the rest digits, after skipping the base-rounding is made this helps to print values which have some last clear bits in the mantissa consider this 32 bit value: (binary)0.00011100001010001111010111000000000 which has mantissa equal: (binary)11100001010001111010111000000000 (32 bits) previous the ToString() method gave: (decimal)0.10999999[...] now we have: (decimal)0.11 added: Parser::SetSmallToZero(bool zero) (default true) if true then the parser changes small values into zero small value means: - if the mantissa of the value consists only of one, two or three set bits - and these bits are next to each other - and the exponent is smaller than about 2 times the number of bits from the mantissa this helps to correctly calculate expressions such as: "0.80-3*0.34+0.22" now the parser gives zero (previous there was a value very closed to zero) added: UInt::FindLowestBit(uint & table_id, uint & index) /temporary version - asm version is missing /

Revision

Modified

Diff to previous 252

fixed: the parser didn't use characters for changing the base (# and &) those characters were skipped (this bug was introduced in 0.9.0)

Revision

Modified

Diff to previous 251

tagging version 0.9.0 of the ttmath library

Revision

Modified

Diff to previous 250

changed: version of the library: 0.9.0 now

Revision

Modified

Diff to previous 248

added: UInt::operator>>(int) UInt::operator>>=(int) UInt::operator<<(int) UInt::operator<<=(int)

Revision

Modified

Diff to previous 247

added: std::string UInt::ToString(uint b = 10) std::wstring UInt::ToWString(uint b = 10) std::string Int::ToString(uint b = 10) std::wstring Int::ToWString(uint b = 10) std::wstring Big::ToWString(const Conv & conv) std::wstring Big::ToWString()

Revision

Modified

Diff to previous 245

added: const char * UInt::LibTypeStr() const char * Big::LibTypeStr() LibTypeCode UInt::LibType() LibTypeCode Big::LibType() returning a string/enum represents the currect type of the library we have following types: asm_vc_32 - with asm code designed for Microsoft Visual C++ (32 bits) asm_gcc_32 - with asm code designed for GCC (32 bits) asm_vc_64 - with asm for VC (64 bit) asm_gcc_64 - with asm for GCC (64 bit) no_asm_32 - pure C++ version (32 bit) - without any asm code no_asm_64 - pure C++ version (64 bit) - without any asm code changed: another compilers than MS VC or GCC by default use no asm version (TTMATH_NOASM)

Revision

Modified

Diff to previous 244

fixed: Int::DivInt() should take parameters as 'sint' and not 'int' this has impact on 64 bit platforms fixed: some warnings from Visual C++ (64 bit)

Revision

Modified

Diff to previous 238

renamed: Conv::comma_digits to Conv::round added: bool Conv::base_round if 'base_round' is true and 'base' is different from 2, 4, 8, or 16 and the result value is not an integer then we make an additional rounding (after converting the last digit from the result is skipped) changed: in Big::ToString() some additional rounding (base_round) is now made only when the value is not an integer

Revision

Modified

Diff to previous 231

added: Int::DivInt(int divisor, int * remainder) changed: added specializations to Big::ToString() when the base is equal 4, 8 or 16 the previous version was not accurate on some last digits (after the comma operator) consider this binary value (32 bit mantissa): base 2: 1.1111 1111 1111 1111 1111 1111 1110 101 previous ToString() gave: base 4: 1.33333333333332 base 8: 1.777777777 base 16: 1.FFFFFF now we have: base 4: 1.3333333333333222 base 8: 1.77777777724 base 16: 1.FFFFFFEA

Revision

Modified

Diff to previous 230

changed: algorithms in Big::Sqrt() and ttmath::Root(x ; n) they were not too much accurate for some integers e.g. Root(16;4) returned a value very closed to 2 (not exactly 2)

Revision

Modified

Diff to previous 229

added: to the parser: function frac() - remains fraction

Revision

Modified

Diff to previous 228

added: Big::Sqrt() global algorithm ttmath::Sqrt() moved to Big::Sqrt()

Revision

Modified

Diff to previous 226

added: UInt::Sqrt() - a new algorithm for calculating the square root

Revision

Modified

Diff to previous 224

added: struct: Conv consists of some parameters used in ToString() and FromString() added: Big::ToString() can group digits e.g. 1234567 -> 1`234`567 added: Parser::SetGroup(int g) Parser::SetComma(int c, int c2 = 0) Parser::SetParamSep(int s) added: uint Big::ToString(std::string & result, const Conv & conv) uint Big::ToString(std::wstring & result, const Conv & conv) std::string Big::ToString(const Conv & conv) const std::string Big::ToString() added: uint FromString(const char * source, const Conv & conv, const char **, bool *) uint FromString(const wchar_t * source, const Conv & conv, const wchar_t **, bool *) uint FromString(const std::string & string, const Conv & conv, const wchar_t **, bool *) uint FromString(const std::wstring & string, const Conv & conv, const wchar_t **, bool *) removed: macros: TTMATH_COMMA_CHARACTER_1 and TTMATH_COMMA_CHARACTER_2 the comma characters we have in Conv struct now

Revision

Modified

Diff to previous 223

updated: CHANGELOG and README

Revision

Modified

Diff to previous 222

tagging version 0.8.6 of the ttmath library

Revision

Modified

Diff to previous 217

changed version: 0.8.6 now

Revision

Modified

Diff to previous 215

added: to the parser: operator percentage e.g. 1000-50%=1000-(1000*0,5)=500

Revision

Modified

Diff to previous 213

fixed: powering algorithm in: UInt::Pow(UInt<value_size> pow) Big::Pow(UInt<pow_size> pow) Big::PowUInt(Big<exp, man> pow) when 'pow' was sufficient large the algorithm returned carry but the result could have been calculated correctly

Revision

Modified

Diff to previous 211

fixed: powering algorithm in: UInt::Pow(UInt<value_size> pow) Big::Pow(UInt<pow_size> pow) Big::PowUInt(Big<exp, man> pow) when 'pow' was sufficient large the algorithm returned carry but the result could have been calculated correctly

Revision

Modified

Diff to previous 210

fixed: buffer overflow in Big::ToInt(Int<int_size> & result)

Revision

Modified

Diff to previous 207

fixed: buffer overflow in Big::ToInt(Int<int_size> & result) changed: small optimization in ToInt(Int<int_size> & result)

Revision

Modified

Diff to previous 206

added: bool Parser::Calculated() this method returns true is something was calculated (at least one mathematical operator was used or a function or variable)

Revision

Modified

Diff to previous 205

removed: Big::AboutEqualWithoutSign() it was broken (it lacks the case when either 'this' or 'ss2' is zero)

Revision

Modified

Diff to previous 204

changed: Big::AboutEqual() it lacks the case when either 'this' or 'ss2' is zero

Revision

Modified

Diff to previous 203

Some fixes from trunk: fixed: UInt::SetBitInWord(uint & value, uint bit) set 1 if the bit was equal 1 (should be set 2) this affected only no-asm parts - when macro TTMATH_NOASM was defined fixed: UInt<value_size>::MulInt(uint ss2) there was a buffer overflow when value_size was equal 1 fixed: UInt::AddVector() and UInt::SubVector() didn't want to compile when macro TTMATH_NOASM was defined fixed: Big::operator>> didn't correctly recognize values in scientific mode (with 'e' character) fixed: Int::FromString(const tt_string & s, uint b = 10) didn't use 'b' (always was '10')

Revision

Modified

Diff to previous 202

fixed: UInt::SetBitInWord(uint & value, uint bit) set 1 if the bit was equal 1 (should be set 2) this affected only no-asm parts - when macro TTMATH_NOASM was defined fixed: UInt<value_size>::MulInt(uint ss2) there was a buffer overflow when value_size was equal 1 fixed: UInt::AddVector() and UInt::SubVector() didn't want to compile when macro TTMATH_NOASM was defined added: macros: TTMATH_LOGC(msg, carry) TTMATH_VECTOR_LOG(msg, vector, len) TTMATH_VECTOR_LOGC(msg, carry, vector, len) added: UInt::PrintVectorLog() for debugging purposes changed: UInt<> class uses new log macros

Revision

Modified

Diff to previous 201

changed: if TTMATH_DEBUG_LOG is defined then TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE is always 3 (regardless of the compiler)

Revision

Modified

Diff to previous 200

changed: small optimization in ttmath_subindexed_x64() (asm for x86_64 on MS VC) changed: removed some MS VC warnings changed: if TTMATH_DEBUG_LOG is defined then UInt::UInt() constructor fills the table with special values added: macro: TTMATH_BITS(min_bits) which returns the number of machine words capable to hold min_bits bits

Revision

Modified

Diff to previous 198

changed: small changes in UInt::Div_CalculatingSize() some warnings were raported by GCC (uninitialized variable)

Revision

Modified

Diff to previous 194

fixed: Factorial(const ValueType & x, ErrorCode * err = 0) didn't want to compile moved: UInt<>::SkipWhiteCharacters() to Misc::SkipWhiteCharacters() UInt<>::CharToDigit() to Misc::CharToDigit() UInt<>::DigitToChar() to Misc::DigitToChar() removed: Parser::CharToDigit() - was duplicated (it's the same as Misc::CharToDigit())

Revision

Modified

Diff to previous 193

small optimization in Parser::Parse(const wchar_t *)

Revision

Modified

Diff to previous 192

fixed: Big::operator>> didn't correctly recognize values in scientific mode (with 'e' character) added: wide characters can be used simultaneously with ascii characters now we have two kind of methods: one for ascii characters and the other for wide characters e.g. void UInt::ToString(std::string & result) void UInt::ToString(std::wstring & result) previous was only one: void UInt::ToString(tt_string & result) and the 'tt_string' was a typedef to either std::string or std::wstring and it was a little misleading to a user (he has to know what the tt_string is) added: file: ttmathmisc.h some useful functions changed: classes: ExceptionInfo, ReferenceError and RuntimeError are used only with ascii characters removed: macros: TTMATH_USE_WCHAR, TTMATH_TEXT() removed: typedefs: tt_char, tt_string, tt_ostringstream, tt_ostream, tt_istream

Revision

Modified

Diff to previous 191

added: uint __fastcall ttmath_addvector_x64(const uint * ss1, const uint * ss2, uint ss1_size, uint ss2_size, uint * result); uint __fastcall ttmath_subvector_x64(const uint * ss1, const uint * ss2, uint ss1_size, uint ss2_size, uint * result); asm code for AddVector() and SubVector() for MS VC x86_64 changed: added prefixes "ttmath_" to all public procedures from ttmathuint_x86_64_msvc.asm

Revision

Modified

Diff to previous 190

changed: removing some MS VC warnings when compiling x86_64 target

Revision

Modified

Diff to previous 189

added: flag TTMATH_BIG_ZERO to Big<> class if this flag is set then there is a value zero added: Big::ClearInfoBit(unsigned char) Big::SetInfoBit(unsigned char) Big::IsInfoBit(unsigned char) some methods for manipulating the info flags changed: IsZero() is using TTMATH_BIG_ZERO flag now it has O(1) complexity previously was O(n) changed: optimized some methods they are using IsZero() for testing at the beginning because this method is much faster now changed: Big::Div(ss2) Big::Mod(ss2) they return 2 when ss2 is zero previously returned 1

Revision

Modified

Diff to previous 187

fixed/optimized: Big::AboutEqual() didn't compile on GCC (there was used ttmath::Abs() function which is unknown in Big<> class) AboutEqual() returned true for: "2345.5" and "-2345.5" (the sign was not checked) renamed: Big::AboutEqual() to Big::AboutEqualWithoutSign() added: Big::AboutEqual()

Revision

Modified

Diff to previous 186

merged: x86_64 asm code for Microsoft Visual compiler file: ttmathuint_x86_64_msvc.asm from chk branch (original was: ttmathuint_x86_amd64_msvc.asm) (this file should be compiled first because MS VC doesn't support inline assembler in x86_64 mode)

Revision

Modified

Diff to previous 185

merged: AboutEqual() from chk branch deleted: properties svn:mime-type from ttmath.h (it was for testing viewvc)

Revision

Modified

Diff to previous 184

setting svn:mime-type to text/plain for ttmath.h

Revision

Modified

Diff to previous 183

added/fixed: special version of ToString_LogBase() method in single thread environment the previous version of the method didn't store the calculated logarithms

Revision

Modified

Diff to previous 182

added: multithread support for Big<> class you should compile with TTMATH_MULTITHREADS and use TTMATH_MULTITHREADS_HELPER macro somewhere in your *.cpp file added file: ttmaththreads.h (look there for more info)

Revision

Modified

Diff to previous 181

- update to current root trunc's version - update to root trunc's UNICODE support

Revision

Modified

Diff to previous 178

- fixed a bug in 64 bit ASM for MSVC

Revision

Modified

Diff to previous 177

* added: global Gamma() function * added: gamma() function to the parser * added: Big::IsInteger() method returns true if the value is integer * added: CGamma<ValueType> class is used with Gamma() and Factorial() in multithreaded environment * changed: Factorial() is using the Gamma() function now * removed: Parser<>::SetFactorialMax() method the factorial() is such a fast now that we don't need the method longer * removed: ErrorCode::err_too_big_factorial

Revision

Modified

Diff to previous 173

added: support for wide characters (wchar_t) wide characters are used when macro TTMATH_USE_WCHAR is defined this macro is defined automatically when there is macro UNICODE or _UNICODE defined some types have been changed char -> tt_char std::string -> tt_string std::ostringstream -> tt_ostringstream std::ostream -> tt_ostream std::istream -> tt_istream normally tt_char is equal char but when you are using wide characters then tt_char will be wchar_t (and so on) (all typedef's are in ttmathtypes.h)

Revision

Modified

Diff to previous 172

- changed "AboutEqualWithoutSign()" to "AboutEqual()" because we need to take the sign into account!

Revision

Modified

Diff to previous 171

- "streamlined" ttmathconfig.h a bit: a) Unicode support if TTMATH_USE_WCHAR is set (compiler must know wchar_t etc, of course) b) threading synchonisation uses WIN32 instead of __MSVC__ define, as this is OS dependent, not compiler dependent

Revision

Modified

Diff to previous 170

- added AboutEqualWithoutSign() to big<> to allow 'suppression' of some unexpected results (that are perfectly logical though, given the possibly unrepresentable nature of binary representation of decimals) like big<>("10.456466") * 2 == big<>("20.912932") resulting in FALSE result.

Revision

Modified

Diff to previous 166

Merged against the current original ttmath trunk

Revision

Modified

Diff to previous 165

creating 0.8.x branch of the ttmath library (copied from trunk)

Revision

Modified

Diff to previous 164

tagging version 0.8.5 of the ttmath library

Revision

Modified

Diff to previous 163

updated changelog to previous commit

Revision

Modified

Diff to previous 161

fixed: Sqrt(), Root() and Factorial() didn't correctly treat the NaN flag fixed: some methods should set 'err_improper_argument' when the argument is a NaN object (was: err_overflow) changed: version of the library: 0.8.5 now

Revision

Modified

Diff to previous 160

changed: small optimization in Big::ExpSurrounding0() and Big::LnSurrounding1() the remainder from a division '%' was changed with a bitwise And operation '&' ((i % 5) == 0) was changed to: ((i & 3) == 0) - it means ((i % 4) == 0) now the test if performed after 4 iterations (early were after 5 iterations) we can do that when the divisor is a power of 2 changed: optimization in Factorial() we're testing WasStopSignal() only after a few iterations it's faster now about 4 times on GCC 4.3.3 (when stop object is provided to the factorial)

Revision

Modified

Diff to previous 158

fixed: (performance) in Big::LnSurrounding1() and Big::ExpSurrounding0() we can copy 'old_value = *this' only when 'testing' is true

Revision

Modified

Diff to previous 157

fixed: Big::FromDouble() on a 32 bit platform: SetNaN() should be SetNan() /*compilation error*/

Revision

Modified

Diff to previous 156

fixed: in Big::FromDouble(): SetNaN() should be SetNan();

Revision

Modified

Diff to previous 155

added: using NaN flag in method Big::ToDouble() and Big::FromDouble() changed: some cosmetic changes to get rid of warnings generated by MS Visual 2008 when warning level is 4 changed: names of labels in asm code: p to ttmath_loop, end to ttmath_end p2 to ttmath_loop2 Robert Muir reported that there was a confict with boost::end

Revision

Modified

Diff to previous 154

- 32 bit ASM code and ASSERTS did not work as the ASM code put its result in EAX, but the ASSERT afterwards did destroy the EAX's contents, of course.

Revision

Modified

Diff to previous 153

- fixed a bug in ttmath.g (missing closing brace in Cos())

Revision

Modified

Diff to previous 152

- optimizations

Revision

Modified

Diff to previous 151

added: to Big<> class: support for NaN flag (Not a Number) bool Big::IsNan() - returns true if the NaN flag is set void Big::SetNan() - sets the NaN flag The NaN flag is set by default after creating an object: Big<1, 2> a; // NaN is set (it means the object has not a valid number) std::cout << a; // cout gives "NaN" a = 123; // now NaN is not set std::cout << a; // cout gives "123" The NaN is set if there was a carry during calculations a.Mul(very_big_value); // a will have a NaN set The NaN is set if an argument is NaN too b.SetNan(); a.Add(b); // a will have NaN because b has NaN too If you try to do something on a NaN object, the result is a NaN too a.SetNan(); a.Add(2); // a is still a NaN The NaN is set if you use incorrect arguments a.Ln(-10); // a will have the NaN flag The only way to clear the NaN flag is to assign a correct value or other correct object supposing 'a' has NaN flag, to remove the flag you can either: a = 10; a.FromInt(30); a.SetOne(); a.FromBig(other_object_without_nan); etc. changed: renamed macro CONSTANTSGENERATOR to TTMATH_CONSTANTSGENERATOR

Revision

Modified

Diff to previous 150

more optimizations for MSVC assembler (parallelism, prefetch optimization, loop alignment, ...)

Revision

Modified

Diff to previous 149

current chk version - too many changes on both sides for now ;-(

Revision

Modified

Diff to previous 148

changed: a little changes in all asm code it should be a little faster

Revision

Modified

Diff to previous 147

added: uint UInt::Mul3(const UInt<value_size> & ss2) 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

Revision

Modified

Diff to previous 146

- corrected 64 bit assembler code (ebx was not preserved) - minor optimization

Revision

Modified

Diff to previous 145

MSVC ASM improvements (no register saves necessary, as this is done automatically by the C compiler)

Revision

Modified

Diff to previous 144

Revision

Modified

Diff to previous 143

- merged Tomasz' version 0.8.5

Revision

Modified

Diff to previous 142

fixed: Big::Mod(x) didn't correctly return a carry and the result was sometimes very big (even greater than x) fixed: global function Mod(x) didn't set an ErrorCode object fixed: global function Round() didn't test a carry now it sets ErrorCode object changed: function Sin(x) to Sin(x, ErrorCode * err=0) when x was very big the function returns zero now it sets ErrorCode object to err_overflow and the result is undefined the same is to Cos() function changed: PrepareSin(x) is using Big::Mod() now when reducing 2PI period should be a little accurate especially on a very big 'x'

Revision

Modified

Diff to previous 139

changed: corrected spaces in changelog

Revision

Modified

Diff to previous 138

tagging version 0.8.4 of the ttmath library

Revision

Modified

Diff to previous 137

changed: version of the library: 0.8.4

Revision

Modified

Diff to previous 136

changed: in ttmathtypes.h 'typedef unsigned long long int ulint' has been put inside '#ifdef TTMATH_NOASM' in order to not confuse a compiler while compiling with strict iso c++ (errors about not defining 'long long' in the c++ standard)

Revision

Modified

Diff to previous 135

fixed: UInt::AddInt() in no-asm code has incorrect assertion changed: UInt::SubInt() in no-asm code is a little faster now changed: small cosmetic changes in commentaries deleted: some debug #ifdef's from UInt::Div() (in no-asm code)

Revision

Modified

Diff to previous 134

added thread-safety to static history buffers (factorial and logarithm) for MSVC

Revision

Modified

Diff to previous 133

- fulfills test file log diff (32 and 64 bit) - macro for issuing the debug output to something else than std::out if specified

Revision

Modified

Diff to previous 132

- minor changes for ASSERT macros - some more "unification" of 32 and 64 bits in typedefs - use of 'char' instead of 'unsigned char', as I may hope that 'char' usually is set to 'unsigned' in most development environments

Revision

Modified

Diff to previous 131

- support for MS specific code (__int64 etc) and warnings - support for AMD64 assembler (not thoroughly tested) - support for UNICODE I/O (strings and streams)

Revision

Modified

Diff to previous 130

dummy commit (user/password checking)

Revision

Modified

Diff to previous 129

creating a chk branch for ChristianK

Revision

Modified

Diff to previous 128

creating directory for branches

Revision

Modified

Diff to previous 127

fixed: deleted default values for variables in some methods (file ttmathuint_x86.h) (they should only be put in declaration)

Revision

Modified

Diff to previous 126

fixed: the problem with GCC optimization on x86_64 sometimes when using -O2 or -O3 GCC doesn't set correctly the stack pointer (actually the stack is used for other things) and you can't use instructions like push/pop in assembler code. All the asm code in x86_64 have been rewritten, now instructions push/pop are not used, other thing which have access to stack (like "m" (mask) constraints in Rcl2 and Rcr2) have also gone away, now the library works well with -O2 and -O3 and the asm code is a little faster

Revision

Modified

Diff to previous 125

added: ttmathuint_x86.h, ttmathuint_x86_64.h, ttmathuint_noasm.h, all the methods which are using assembler code have been rewritten to no-asm forms, now we have: 1. asm for x86 file: ttmathuint_x86.h 2. asm for x86_64 file: ttmathuint_x86_64.h 3. no asm file: ttmathuint_noasm.h (it's used when macro TTMATH_NOASM is defined) The third form can be used on x86 and x86_64 as well and on other platforms with a little effort. (Temporarily I left there some '#ifdef's for debugging.)

Revision

Modified

Diff to previous 121

added: UInt::PrintLog(const char * msg, std::ostream & output) used for debugging purposes by macro TTMATH_LOG(msg) (it is used in nearly all methods in UInt class) added: macro TTMATH_DEBUG_LOG: when defined then TTMATH_LOG() put some debug information (to std::cout)

Revision

Modified

Diff to previous 120

tagging version 0.8.3 of TTMath library

Revision

Modified

Diff to previous 117

changed: version of the library: 0.8.3 now

Revision

Modified

Diff to previous 113

added: Objects::IsDefined(const std::string & name) returning true if such an object is defined

Revision

Modified

Diff to previous 112

fixed: the parser didn't correctly treat operators for changing the base (radix) -- operators '#' and '&', e.g.: '#sin(1)' was equal '0' -- there was a zero from '#' and then it was multipied by 'sin(1)' the parser didn't check whether Big::FromString() has actually read a proper value -- the method Big::FromString() didn't have something to report such a situation fixed: Big::FromString() when the base is 10, the method reads the scientific part only if such a part it correctly supplied, e.g: '1234e10', '1234e+10', '1234e-5' previous '1234e' was treated as: '1234e0' (now parsing stops on 'e' and the 'e' can be parsed by other parsers, e.g. the mathematical parser -- now in the parser would be: '1234e' = '1234 * e' = '3354,3597...' ) added: to Int::FromString(): parameter 'const char ** after_source = 0' if exists it's pointing at the end of the parsed string added: to UInt::FromString(), Int::FromString(), Big::FromString(): parameter 'bool * value_read = 0' - (if exists) tells whether something has actually been read (at least one digit) added: the parser checks itself for the operators for changing the base (operators '#' and '&') changed: in the parser: the form with operators '#' and '&' is as follows: [-|+][#|&]numeric_value previous was: [-|+][#|&][-|+]numeric_value removed: Big::FromString() this method doesn't longer recognize operators for changing the base ('#' and '&') changed: in the parser: the short form of multiplication has the same priority as the normal multiplication, e.g.: '2x^3' = 2 * (x^3) previous the priority was greater than powering priority previous: '2x^3' = (2*x) ^ 3

Revision

Modified

Diff to previous 111

changed: doxygen.cfg changed lines ends: dos mode to unix mode (\r\n to \n)

Revision

Modified

Diff to previous 110

changed: updated CHANGELOG to previous commit

Revision

Modified

Diff to previous 109

fixed: in function DegToRad(const ValueType & x, ErrorCode * err = 0) it is better to make division first and then mutliplication -- the result is more accurate especially when x is: 90,180,270 or 360 added: global template functions in ttmath.h: ValueType GradToRad(const ValueType & x, ErrorCode * err = 0) ValueType RadToGrad(const ValueType & x, ErrorCode * err = 0) ValueType DegToGrad(const ValueType & x, ErrorCode * err = 0) ValueType DegToGrad(const ValueType & d, const ValueType & m, const ValueType & s, ErrorCode * err = 0) ValueType GradToDeg(const ValueType & x, ErrorCode * err = 0) added: Parser::SetDegRadGrad(int angle) - 0 deg, 1 rad (default), 2 grad this affects following functions (in the parser only): sin, cos, tan, cot, asin, acos, atan, acot added: functions to the parser: gradtorad(grad), radtograd(rad), degtograd(deg), degtograd(d,m,s), gradtodeg(grad) removed: Big::Ln() and Big::Log() some old info was removed

Revision

Modified

Diff to previous 108

added: '#ifndef __GNUC__' to Big::Pow() where is using '#pragma warning' in order to not confuse GCC

Revision

Modified

Diff to previous 107

fixed: Big::Pow(const Big<exp, man> & pow) it's using PowInt() only when pow.exponent is in range (-man*TTMATH_BITS_PER_UINT; 0] previously the powering 'hung' on an input like this: "(1+ 1e-10000) ^ 10e100000000" (the was 10e100000000 iterations in PowInt())

Revision

Modified

Diff to previous 106

changed: current info in CHANGELOG

Revision

Modified

Diff to previous 105

fixed: template Big::FromBig(const Big<another_exp, another_man> & another) didn't correctly set the exponent (when the mantisses had different size - when 'man' was different from 'another_man') this had impact on operator= too sample: Big<2,3> a = 100; Big<3,5> b; b = a; // b had a wrong value

Revision

Modified

Diff to previous 104

added: 'constgen' directory -- there is a program there to generate some constants used in ttmathbig.h changed: the size of built-in variables (constants) in ttmathbig.h now they consist of 256 32bit words macro TTMATH_BUILTIN_VARIABLES_SIZE is equal: 256u on a 32bit platform and 128ul on a 64bit platform added: macro CONSTANTSGENERATOR which is useful for generating constants (it's used by 'gen' program in 'constgen' directory) after declaring this macro the methods: ExpSurrounding0() and LnSurrounding1() will be public visible and the inner loop can do more iterations than TTMATH_ARITHMETIC_MAX_LOOP changed: in methods: ExpSurrounding0() and LnSurrounding1() - the way of comparising with the last word (now we're comparing not with the last state but with a state from a few words back)

Revision

Modified

Diff to previous 103

fixed: there was a TTMATH_REREFENCE_ASSERT error in Big::PowUInt() caused by: start.Mul(start) fixed: Big::Add incorrectly rounded 'this' when both exponents were equal it caused that sometimes when adding a zero the result has changed this had impact among other things on FromString() method "0,8" had different binary representation from "0,80" changed: renamed: Big::PowUInt(UInt<pow_size> pow) -> Big::Pow(UInt<pow_size> pow) it returns 2 when there is: 0^0 changed: renamed: Big::PowInt(Int<pow_size> pow) -> Big::Pow(Int<pow_size> pow) it returns 2 when there is: 0^0 or 0^(-something) changed: renamed: Big::PowBUInt() -> PowUInt(), Big::PowBInt() -> Big::PowInt() they return 2 when the arguments are incorrect (like above) changed: UInt::SetBitInWord(uint & value, uint bit) is taking the first argument by a reference now, the specific bit is set in the 'value' and the method returns the last state of the bit (zero or one) added: UInt::GetBit(uint bit_index) - returning the state of the specific bit changed: UInt::SetBit(uint bit_index) - it's using TTMATH_ASSERT now changed: Big::Mod2() - it's using mantissa.GetBit() now added: Big::operator=(double) and Big::Big(double) added: TTMATH_ASSERT somewhere in ttmathuint64.h added: UInt::Pow(UInt<value_size> pow) and Int::Pow(Int<value_size> pow)

Revision

Modified

Diff to previous 102

changed: small changes in: UInt:: RclMoveAllWords, UInt::RcrMoveAllWords, UInt::SetBitInWord(), UInt::FindLeadingBitInWord, UInt::SetBitInWord fixed: UInt::Div() didn't return a correct result when the divisor was equal 1 there was an error in UInt::DivInt() - when the divisor was 1 it returned zero and the carry was set this error was from the beginning of the TTMath library

Revision

Modified

Diff to previous 101

fixed: UInt::Rcr2_one used edx but there was not a push/pop instruction (it was in the intel syntax, edx changed to ecx)

Revision

Modified

Diff to previous 97

changed: UInt::Div3_Normalize - faster now

Revision

Modified

Diff to previous 96

added: macros TTMATH_ASSERT to: UInt::AddInt UInt::AddTwoInts UInt::SubInt UInt::SetBitInWord fixed: UInt::FindLeadingBitInWord(x) didn't correctly return result -1 when the x was 0 the mistake made by Thomas Braby, it was not in the 0.8.2 release changed: tests: we do not test for lahf/sahf instructions now (in 64bit code) we don't use these instructions

Revision

Modified

Diff to previous 95

added: tests: addtwoints for 64bits

Revision

Modified

Diff to previous 85

changed: UInt::FromString(...) skips the input digits when the value is too big added: tests: addtwoints (only 32bit)

Revision

Modified

Diff to previous 84

fixed: RclMoveAllWords() and RcrMoveAllWords() sometimes didn't return the proper carry, (when 'bits' was greater than or equal to 'value_size') this had impact on Rcl() and Rcr(), they also returned the wrong carry

Revision

Modified

Diff to previous 83

added: UInt::Rcl2_one(c) and UInt::Rcr2_one(c) they are much faster than UInt::Rcl2(1,c) and Rcr2(1,c) changed: UInt::Rcl() and UInt::Rcr() we don't longer make the things with moving a half in the left and a half in the right we simply use Rcl2_one() and Rcl2() /Rcr2_one() and Rcr2()/

Revision

Modified

Diff to previous 82

changed: asm code in: UInt::Sub, UInt::SubInt (32 and 64bit) (much faster now) changed: asm code in: UInt::Rcl2, UInt::Rcr2 (32 and 64bit) previous versions of Rcl2 and Rcr2 had O(n2) complexity, now they have O(n) and are much faster changed: now we do not use LAHF and SAHF instructions (both in 32 and 64 bit code)

Revision

Modified

Diff to previous 81

changed: asm code in UInt::Add, UInt::AddInt, AddTwoInts 32 and 64 bits, much faster now added: tests for UInt::AddInt fixed: tests: test_lahf() returned incorrect value for 32bit platform

Revision

Modified

Diff to previous 80

added: test of the LAHF and SAHF instructions (on a 64bit platform)

Revision

Modified

Diff to previous 79

changed: 64bit asm code didn't want to compile there were used 'lahf' and 'sahf' instructions probably they are supported in a new version of GCC with '-msahf' option but GCC 4.2.1 has no such option at the moment I'm using opcodes: lahf -> 9f sahf -> 9e Warning! these instructions are not on all 64bit processors from: http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html "Early Intel CPUs with Intel 64 lacked LAHF and SAHF instructions supported by AMD64 until introduction of Pentium 4 G1 step in December 2005." changed: UInt::Add on 64bit platform changed: UInt::Add on 32bit platform (a little)

Revision

Modified

Diff to previous 78

changed: UInt::FromString, added a parametr 'after_source' which is pointing at the end of the parsing string added: initial import of tests: testing UInt::Add method (not finished)

Revision

Modified

Diff to previous 69

some optimisations made in assembler code by thomasbraby at zoom.co.uk (not verified yet) modified files: ttmathuint.h ttmathuint64.h I've changed a little the intel syntax (it didn't want to compile)

Revision

Modified

Diff to previous 68

tagging version 0.8.2 of TTMath library

Revision

Modified

Diff to previous 67

changed: small changes especially cosmetic in documentation (commentaries) changed: version of the library: now 0.8.2

Revision

Modified

Diff to previous 66

changed: info about Big::ToString() the changes which were made in revision 60 and 63 (I forgot to change the info there)

Revision

Modified

Diff to previous 63

changed: the way of using Big::SetSign() the method do not check whether there is a zero or not now (even if there's a zero the method can set a sign bit) I changed this due to some prior errors (errors corrected in revision 17, 49 and 58) added: in Big::MulInt() checking whether the values are zeros and if so the metdhod returns zero immediately removed: file TODO (I didn't use it)

Revision

Modified

Diff to previous 61

changed: 'max_digit_after_comma' in Big::ToString() remove the -2 state added: 'remove_trailing_zeroes' in Big::ToString() it's either true or false

Revision

Modified

Diff to previous 60

added: a short form of multiplication (without the '*' character) e.g. '5y', (it's used only if the second parameter is a variable or function) changed: variables and functions are case-sensitive now added: variables and functions can have underline characters in their names

Revision

Modified

Diff to previous 58

added: 'decimal_point' parameter into Big::ToString(...) fixed: Big::operator>> didn't use TTMATH_COMMA_CHARACTER_2 macro

Revision

Modified

Diff to previous 56

fixed: there was an error in Big::FromInt(Int<int_size> value) SetSign() was used before the object was initialized

Revision

Modified

Diff to previous 49

added: Big::FromBig() and an operator= and a contructor for converting from another kind of a Big class added: to the parser: avg(), sum()

Revision

Modified

Diff to previous 48

fixed: Big::FromDouble(double) sometimes sets a wrong value there was SetSign() used when the value was not defined, and also was a small mistake when the mantissa was equal one word (on 32bit platforms) added: uint Big::ToDouble(double&) - converting into double

Revision

Modified

Diff to previous 47

added: a method Big::FromDouble(double) for 64bit platforms

Revision

Modified

Diff to previous 46

added: method Big::FromDouble(double) which converts from standard double into a Big<> (only 32bit platforms)

Revision

Modified

Diff to previous 42

changed: the parser is allowed to recognize values which begin with a dot, e.g '.5' is treated as '0.5'

Revision

Modified

Diff to previous 41

changed: Int::FromInt(const Int<argument_size> & p), Int::FromInt(sint value) (it returns zero now) Int::operator=(uint i) Int::Int(uint i) added: Int::FromUInt(const UInt<argument_size> & p), Int::FromUInt(uint value) and appropriate constructors and assignment operators as well changed: Big::FromInt(Int<int_size> value), added: Big::FromUInt(UInt<int_size> value), Big::operator=(const UInt<int_size> & value) Big::Big(const UInt<int_size> & value)

Revision

Modified

Diff to previous 39

added: Uint::BitNot2() this method has been proposed by Arek <kmicicc AnTispam users.sourceforge.net>

Revision

Modified

Diff to previous 38

tagging 0.8.1 release of the TTMath library

Revision

Modified

Diff to previous 36

changed: the way of parsing operators in the mathematical parser (the parser is not too much greedy now)

Revision

Modified

Diff to previous 35

added: UInt::BitAnd(), UInt::BitOr(), UInt::BitXor(), UInt::BitNot(), Big::BitAnd(), Big::BitOr(), Big::BitXor() added: to the parser: bitand(), bitor(), bitxor() /band(), bor(), bxor()/

Revision

Modified

Diff to previous 34

changed: small changes in: Big::SetPi(), Big::Set05Pi(), Big::Set2Pi(), Big::ChangeSign() added: ASinh(), ACosh(), ATanh() /ATgh()/, ACoth() /ACtgh()/ and to the parser as well

Revision

Modified

Diff to previous 33

added: doxygen.cfg for generating a documentation from the doxygen changed: UInt::Rcl(uint c=0) and UInt::Rcr(uint c=0) into UInt::Rcl2(uint bits, uint c) and UInt::Rcr2(uint bits, uint c) now they can move more than one bit and they are only private fixed: UInt::Rcl(uint bits, uint c) and UInt::Rcr(uint bits, uint c) didn't correctly return a carry if the 'bits' were equal to 'value_size*TTMATH_BITS_PER_UINT' changed: UInt::Rcl(uint bits, uint c) and UInt::Rcr(uint bits, uint c) into UInt::Rcl(uint bits, uint c=0) and UInt::Rcr(uint bits, uint c=0) they are faster now when the bits is greater than a half of the TTMATH_BITS_PER_UINT changed: UInt::CompensationToLeft() it's faster now changed: more small changes where there were UInt::Rcl(uint c=0) and UInt::Rcr(uint c=0) used

Revision

Modified

Diff to previous 32

added: UInt::MulInt(int, UInt<int another_size>::&) added: Big::MulUInt(uint) changed: Big::MulInt(sint) added: Big::ToUInt(uint &) changed: Big::ToInt(sint&) changed: Factorial() it uses Big::MulUInt() at the beginning (faster now especially more on a 32bit platform)

Revision

Modified

Diff to previous 27

fixed: Big::PowFrac(..) didn't return a correct error code (when 'this' was negative) added: Root(x; index) (and to the parser as well) added: macro: TTMATH_PRERELEASE_VER (can be either zero or one)

Revision

Modified

Diff to previous 26

tagging the 0.8.0 release of the TTMath library

Revision

Modified

Diff to previous 25

creating a directory ttmath/tags

Revision

Modified

Diff to previous 24

added: DegToDeg(deg, min, sec), DegToRad(deg), DegToRad(deg, min, sec), RadToDeg(rad), Ceil(x), Floor(x), Sqrt(x), Sinh(x), Cosh(x), Tanh(x) /Tgh(x)/, Coth(x) /Ctgh(x)/ changed: class Objects in ttmathobjects.h has been completely rewritten, we can change the names of user-defined variables or functions, and the names are case-sensitive now added: class History which is used in functions which take a lot of time during calculating e.g. Factorial(x) added: Tg(x) a wrapper for Tan(x) changed: CTan(x) is Cot(x) now added: Ctg(x) a wrapper for Cot(x) added: ATg(x) a wrapper for ATan(x) changed: ACTan(x) is ACot(x) now added: ACtg(x) a wrapper for ACot(x) added: UInt::PrintTable() (for debugging etc.) changed: the methods Big::SetPi() Big::SetE() and Big::SetLn2() have been rewritten, now they have 128 32bit words (it's about 1232 valid decimal digits) fixed: previous values from Big::SetPi() Big::SetE() and Big::SetLn2() were not too much accurate (last 2-3 words were wrong) added: Big::SetLn10() (128 32bit words as well) added: macro: TTMATH_BUILTIN_VARIABLES_SIZE which is equal 128u on 32bit platforms and 64ul on 64bit platforms (128/2=64) added: macros: TTMATH_PLATFORM32 and TTMATH_PLATFORM64 changed: a small optimisation in UInt::Mul2Big() added: at the end of ttmath.h: #include "ttmathparser.h" this is for convenience for a programmer, he can only use #include with ttmath.h even if he uses the parser added: to samples: big.cpp, parser.cpp fixed: constructor Big::Big(uint) - it was wrong because it was using the method Big::FromInt(sint) which could produce wrong values (if the 'uint' couldn't correctly be casted into the 'sint') added: Big::FromUInt(uint) changed: Big::FromInt(sint), Big::SetOne(), renamed Big::SetDotOne() into Big::Set05() (they are a little faster now) added: Big::operator=(uint) changed: in 64bit mode: constructor: Big::Big(int) added: in 64bit mode: constructor: Big::Big(unsigned int), operators: Big::operator=(signed int) and Big::operator=(unsigned int) (these operators and the constructor take a 32bit value) deleted: the word 'virtual' from destructors: UInt, Int, Big (types in this library are not projected to be base-classes for another ones derived from them) changed: UInt::operator=(uint), UInt::UInt(uint), Int::operator=(sint), Int::Int(sint) added: UInt::FromUInt(uint), UInt::operator=(sint), UInt::UInt(sint), Int::FromInt(sint), Int::operator=(uint), Int::Int(uint), Int::operator==(const Int<>&), Int::operator!=(const Int<>&) added: in 64bit mode: UInt::operator=(unsigned int), UInt::UInt(unsigned int), UInt::operator=(signed int), UInt::UInt(signed int) (these operators and the constructors take a 32bit value) added: in 64bit mode: Int::operator=(signed int), Int::Int(signed int), Int::operator=(unsigned int), Int::Int(unsigned int) (these operators and the constructors take a 32bit value)

Revision

Modified

Diff to previous 23

added: into the parser: SetFactorialMax()

Revision

Modified

Diff to previous 19

added: checking whether an user gives a correct value of a variable or function (user-defined variables/functions in the mathematical parser) added: into the parser: logical operators: > < >= <= == != && || added: into the parser: logical functions: and() or() not() if() changed: a method for looking for a mathematical operator (there's the operators table now) added: ErrorCode::err_unknown_operator when the parser couldn't read an operator

Revision

Modified

Diff to previous 17

added: Big::Mod - the remainder from a division added: Big::Sgn - the 'sign' from the value (-1,0,1) added: global functions Mod and Sgn too

Revision

Modified

Diff to previous 16

fixed: removed 'const' from some methods (operators: += -= *= /=) in the Big class fixed: bad sizes in tables in some 'Set...' methods in the Big class fixed: Big::FromInt(Int<int_size> value) - the sign must be set at the end because SetSign checks whether there is zero and depends on it sets the sign or not (this was the stupid error which causes sometimes the errors 'overflow during printing') fixed: Big::SetMin - the sign must be set at the and changed: Big::Pow can use the reference now (the problem was actually with the Big::FromInt) added: a namespace 'auxiliaryfunctions' (in ttmath.h) added: ATan - arc tan, ACTan - arc ctan

Revision

Modified

Diff to previous 15

fixed: constraints in asm operands for gcc added: UInt::SetFromTable for 64bit code (now the support for 64bit platforms seems to be completed) added: asin - arc sin, acos - arc cos

Revision

Modified

Diff to previous 13

added: ErrorCode::err_still_calculating (it's used when there is more than one thread)

Revision

Modified

Diff to previous 12

added samples/uint.cpp samples/int.cpp samples/Makefile changed Int::Div -- a remainder is not returning now but taking as a parameter (a pointer or reference) changed order in parameters in UInt::AddTwoInts added Int::AddInt added Int::AddTwoInts added Int::SubInt changed Int::AddOne and Int::SubOne (much faster now) fixed a bug in UInt::operator--() and Int::operator--() (there was adding instead of subtracting)

Revision

Modified

Diff to previous 3

fixed the problem with a sign in the mathematical parser /-(1) was 1/ added UInt::AddInt and UInt::SubInt changed UInt::AddOne and UInt::SubOne (much faster now) added UInt::SetBitInWord changed UInt::SetBit (much faster now) UInt::AddTwoUints renamed to UInt::AddTwoInts UInt::FindLeadingBit32 renamed to UInt::FindLeadingBitInWord added UInt::SetBitInWord UInt::Mul64 renamed to UInt::MulTwoWords UInt::Div64 renamed to UInt::DivTwoWords and more small changes in UInt type start adding support for Amd64 (not finished yet) (added ttmathuint64.h)

Revision

Modified

Diff to previous 1

changed the sequence of arguments in logarithm functions changed kind of templates in ttmath.h (template<class ValueType> is now) added TTMATH_RELEASE macro added TTMATH_ prefix into macros changed multiplication in UInt type (now we can use both algorithm in the same time) added ExceptionInfo, ReferenceError and RuntimeError classes now TTMATH_ASSERT throws another type of object added TTMATH_REFERENCE_ASSERT (it is instead of MATHTT_THIS_ASSERT)

Revision

Added

initial import

svnadmin@ttmath.org | ViewVC Help |

Powered by ViewVC 1.2.1 |