aad580f51e
in ASin() and Gamma() there is used SetZeroNan() to suppress a warning about an uninitialized variable (for gcc)
master
Tomasz Sowa2019-10-23 16:09:19 +00:00
3b113374b7
removed: white characters from tests2/Makefile
Tomasz Sowa2019-10-23 13:24:37 +00:00
0f2fcaf547
updated tests2 output for big_64_64 (tests2/big_64_64.expected)
Tomasz Sowa2019-10-23 13:06:01 +00:00
f88cba2688
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%"
Tomasz Sowa2019-10-23 12:38:22 +00:00
48d694a47f
added: some tests for Big<> and Parser<> classes (tests2 directory)
Tomasz Sowa2019-10-15 19:14:08 +00:00
9a93db39c4
updated doxygen.cfg (clear config generated from 1.8.15 version)
Tomasz Sowa2019-10-09 21:00:20 +00:00
132fa10cd4
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
Tomasz Sowa2019-07-31 07:14:21 +00:00
dcdb1db9ec
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
Tomasz Sowa2019-04-11 16:14:04 +00:00
d93d5ffd74
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)
Tomasz Sowa2018-10-30 21:04:06 +00:00
9b279276f2
changed: commentaries to be more doxygen friendly
Tomasz Sowa2017-03-12 17:28:38 +00:00
83b5ab7170
changed: commentaries to be more doxygen friendly changed: put block characters {...} is some places
Tomasz Sowa2017-03-12 17:13:37 +00:00
35333b1e32
added: makerelease.sh script to generate the source package tarball
Tomasz Sowa2017-03-12 15:18:16 +00:00
c73af9c116
- changed info in headers in source files: (new) BSD licence -> 3-Clause BSD Licence - added svn:ignore in some places
Tomasz Sowa2017-03-12 14:51:21 +00:00
f06592376f
changed: some return values has been cleaned in ttmathuint.h (eclipse builtin parser reported errors but actually the code was correct)
Tomasz Sowa2017-03-12 12:35:50 +00:00
b36821024b
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
Tomasz Sowa2017-03-12 12:34:01 +00:00
cd740c5924
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)
Tomasz Sowa2017-02-08 09:02:52 +00:00
46ed8c3108
fixed: in Object::GetValueAndParam() there was value.empty() used instead of value.clear()
Tomasz Sowa2017-02-08 08:42:02 +00:00
f4f7882387
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
Tomasz Sowa2017-02-07 20:42:43 +00:00
86dc01cdee
updated: CHANGELOG, COPYRIGHT, doxygen.cfg added: directory 'res' with logos added: empty directory 'doc'
Tomasz Sowa2017-02-07 14:24:58 +00:00
2067301d1c
changed: get rid of some warnings generated by gcc and clang
Tomasz Sowa2017-02-07 14:19:59 +00:00
e2cdeac423
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)
Tomasz Sowa2017-02-06 02:13:05 +00:00
5893ffa9e3
added: CMakeLists.txt files for building samples by using cmake system submitted by Mateusz Loskot <mateusz at loskot dot net>
Tomasz Sowa2014-11-28 15:59:08 +00:00
b862422bd9
fixed: in Parser: in method SetDegRadGrad(int angle) there is incorrectly use || operator (the && shoud be used) reported by heby on the ttmath forum
Tomasz Sowa2014-04-04 23:36:48 +00:00
cb15ac0cd8
removed: some warning messages generated by GCC from ttmathuint.h (Mul3Big3)
Tomasz Sowa2013-06-13 21:31:53 +00:00
77c41e644a
corrected: the date in CHANGELOG (2012.12->2012.11)
Tomasz Sowa2012-11-28 16:24:00 +00:00
506840787a
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
0.9.3
Tomasz Sowa2012-11-28 16:19:05 +00:00
e58253a078
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)
Tomasz Sowa2012-10-30 13:07:38 +00:00
6862321fad
added: ttmath/ttmathdec.h starting work on a Decimal template type
Tomasz Sowa2012-02-04 16:26:11 +00:00
2e192969b0
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)
Tomasz Sowa2011-02-27 18:13:32 +00:00
e8daa77d75
changed: UInt::ToString() had O(n^2) complexity where n was the number of digits to print now it has O(n)
Tomasz Sowa2011-02-07 22:37:44 +00:00
231164f6ea
added: option 'group_digits' to Conv struct you can set how many digits should be grouped
Tomasz Sowa2011-01-30 17:34:42 +00:00
c51b2fdcc9
changed: small improvements in UInt::Pow() and Big::Pow()
Tomasz Sowa2010-10-14 23:21:16 +00:00
84f34ebe52
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
Tomasz Sowa2010-09-29 21:14:32 +00:00
a34cf55155
added TTMATH_LOG to UInt::FromUInt(ulint n)
Tomasz Sowa2010-09-23 19:51:55 +00:00
648de47400
fixed: Int::ToUInt(unsigned int & result) wrong carry was returned
Tomasz Sowa2010-09-23 19:25:26 +00:00
362207e2f1
added some missing methods: ToUInt, ToInt, FromUInt, FromInt in Big<> class
Tomasz Sowa2010-09-23 18:56:55 +00:00
a40e951923
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()
Tomasz Sowa2010-09-22 19:43:12 +00:00
b028896118
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)
Tomasz Sowa2010-09-21 22:31:07 +00:00
a67a088e3a
removed: macro TTMATH_REFERENCE_ASSERT from all methods from public interface
Tomasz Sowa2010-09-21 15:52:48 +00:00
996fac15f1
in Big::ToString_CreateNewMantissaTryExponent(): ToString_BaseRound can be called only for non integer values
Tomasz Sowa2010-09-19 21:58:51 +00:00
1e268f1808
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
Tomasz Sowa2010-09-19 21:54:46 +00:00
90674c9505
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
Tomasz Sowa2010-09-19 17:23:39 +00:00
b6fe168e3c
added: Big::operator++() Big::operator++(int) Big::operator--() Big::operator--(int) Big::AddOne() Big::SubOne() changed: Big::SetOne() a little faster now
Tomasz Sowa2010-09-18 01:35:16 +00:00
ae61b302a8
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)
Tomasz Sowa2010-09-15 20:43:21 +00:00
a1c41c02db
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
Tomasz Sowa2010-09-05 18:21:58 +00:00
69f065245e
fixed: Big::Add sometimes incorrectly rounded the last bit from mantissa (when exp_offset == mantissa_size_in_bits ) the rounding_up was always false
Tomasz Sowa2010-08-18 23:31:58 +00:00
c65dac524a
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
Tomasz Sowa2010-08-18 18:09:16 +00:00
b3c3dd8c3f
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 *)
Tomasz Sowa2010-08-18 09:22:38 +00:00
1b7e13a9fd
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
Tomasz Sowa2010-03-01 13:08:50 +00:00
053861655d
added: to samples: big2.cpp with TTMATH_BITS() macro
Tomasz Sowa2010-02-07 13:36:39 +00:00
35f2a8a28b
the half-to-even rounding was turned off (some 'return' statement left)
Tomasz Sowa2010-02-02 21:05:08 +00:00
d5a5ea1a7d
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()
Tomasz Sowa2010-02-02 21:02:10 +00:00
32b8c7a957
removed: from parser: SetSmallToZero(bool zero) this was actually a bad feature
Tomasz Sowa2010-01-06 00:54:01 +00:00
e727eacce0
added: static sint UInt<value_size>::FindLowestBitInWord(uint x) (asm_vc_32, asm_gcc_32, no_asm, and intrinsic for vc64)
Tomasz Sowa2010-01-03 01:10:37 +00:00
39db6fc469
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
Tomasz Sowa2009-12-28 15:41:28 +00:00
0ada20b4cb
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
Tomasz Sowa2009-12-25 22:06:49 +00:00
31563ce343
fixed: I have forgotten to remove rounding down from division (Big::div)
Tomasz Sowa2009-12-14 15:54:23 +00:00
418db51f46
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
Tomasz Sowa2009-12-14 12:16:32 +00:00
82711f4441
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
Tomasz Sowa2009-12-12 20:45:18 +00:00
e5fc7a52e8
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
Tomasz Sowa2009-12-06 23:18:05 +00:00
357524ae13
added: IEEE 754 half-to-even rounding (bankers' rounding) to the following floating point algorithms: Big::Add Big::Sub Big::Mul Big::Div
Tomasz Sowa2009-12-06 01:09:55 +00:00
72052420dd
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 /
Tomasz Sowa2009-12-05 18:13:53 +00:00
321953e833
fixed: the parser didn't use characters for changing the base (# and &) those characters were skipped (this bug was introduced in 0.9.0)
Tomasz Sowa2009-12-02 11:38:17 +00:00
de150d00ec
added: UInt::operator>>(int) UInt::operator>>=(int) UInt::operator<<(int) UInt::operator<<=(int)
Tomasz Sowa2009-11-25 12:57:06 +00:00
2d821bbad9
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()
Tomasz Sowa2009-11-24 20:39:36 +00:00
e083c5f889
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)
Tomasz Sowa2009-11-24 20:15:46 +00:00
11b9f389b9
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)
Tomasz Sowa2009-11-24 06:12:46 +00:00
bac79e0bfa
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
Tomasz Sowa2009-11-24 05:14:54 +00:00
0d1a57bdb4
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
Tomasz Sowa2009-11-09 17:42:10 +00:00
4b4b30392a
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)
Tomasz Sowa2009-11-01 20:26:01 +00:00
4f1763d773
added: to the parser: function frac() - remains fraction
Tomasz Sowa2009-11-01 14:20:48 +00:00
cccf82797f
added: Big::Sqrt() global algorithm ttmath::Sqrt() moved to Big::Sqrt()
Tomasz Sowa2009-11-01 13:41:29 +00:00
e73ce2f8bc
added: UInt::Sqrt() - a new algorithm for calculating the square root
Tomasz Sowa2009-11-01 13:26:19 +00:00
2feabc64e2
added: struct: Conv consists of some parameters used in ToString() and FromString() added: Big::ToString() can group digits e.g. 1234567 -> 1234567 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
Tomasz Sowa2009-11-01 01:40:40 +00:00
bf520689fb
added: to the parser: operator percentage e.g. 1000-50%=1000-(1000*0,5)=500
Tomasz Sowa2009-10-18 12:37:14 +00:00
a4bb0b6f64
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
Tomasz Sowa2009-10-16 21:38:25 +00:00
af4fbf3098
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
Tomasz Sowa2009-10-16 16:56:49 +00:00
e046aba6d2
fixed: buffer overflow in Big::ToInt(Int<int_size> & result)
Tomasz Sowa2009-10-15 01:40:13 +00:00
462ff7cc65
fixed: buffer overflow in Big::ToInt(Int<int_size> & result) changed: small optimization in ToInt(Int<int_size> & result)
Tomasz Sowa2009-10-15 01:34:13 +00:00
02da809583
added: bool Parser::Calculated() this method returns true is something was calculated (at least one mathematical operator was used or a function or variable)
Tomasz Sowa2009-10-13 22:38:08 +00:00
32ebbbfd9e
removed: Big::AboutEqualWithoutSign() it was broken (it lacks the case when either 'this' or 'ss2' is zero)
Tomasz Sowa2009-10-12 23:27:14 +00:00
e765fba8a1
changed: Big::AboutEqual() it lacks the case when either 'this' or 'ss2' is zero
Tomasz Sowa2009-10-12 23:25:35 +00:00
5ef27bdbd0
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')
Tomasz Sowa2009-10-07 17:33:03 +00:00
a8eb29e57d
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
Tomasz Sowa2009-10-03 01:10:08 +00:00
31b8c242bd
changed: if TTMATH_DEBUG_LOG is defined then TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE is always 3 (regardless of the compiler)
Tomasz Sowa2009-09-20 20:41:11 +00:00
4c0d8c26ff
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
Tomasz Sowa2009-09-20 20:10:29 +00:00
01a86e40d9
changed: small changes in UInt::Div_CalculatingSize() some warnings were raported by GCC (uninitialized variable)
Tomasz Sowa2009-09-20 12:47:44 +00:00
f19078f9f1
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())
Tomasz Sowa2009-09-17 23:18:11 +00:00
adc5015ad9
small optimization in Parser::Parse(const wchar_t *)
Tomasz Sowa2009-09-13 19:29:29 +00:00
da730d1c70
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
Tomasz Sowa2009-09-13 19:16:42 +00:00
9ccacd8817
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
Tomasz Sowa2009-09-11 23:55:44 +00:00
b3d27979d0
changed: removing some MS VC warnings when compiling x86_64 target
Tomasz Sowa2009-09-11 20:48:52 +00:00
e13e5eb329
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
Tomasz Sowa2009-09-11 04:24:42 +00:00
74b31b1f54
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()
Tomasz Sowa2009-09-10 16:28:05 +00:00