ViewVC Help
View Directory | Revision Log | View Changeset | Root Listing
root/publicrep/ttmath/trunk
Sticky Revision:
Sort logs by:
Revision 1229 - Directory Listing
Modified Wed Oct 23 16:09:19 2019 UTC (10 months, 3 weeks ago) by tomek
in ASin() and Gamma() there is used SetZeroNan() to suppress a warning about an uninitialized variable (for gcc)



Revision 1228 - Directory Listing
Modified Wed Oct 23 13:24:37 2019 UTC (10 months, 3 weeks ago) by tomek
removed: white characters from tests2/Makefile


Revision 1227 - Directory Listing
Modified Wed Oct 23 13:06:01 2019 UTC (10 months, 3 weeks ago) by tomek
updated tests2 output for big_64_64 (tests2/big_64_64.expected)


Revision 1226 - Directory Listing
Modified Wed Oct 23 12:38:22 2019 UTC (10 months, 3 weeks ago) by tomek
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 1225 - Directory Listing
Modified Tue Oct 15 19:14:08 2019 UTC (11 months ago) by tomek
added: some tests for Big<> and Parser<> classes (tests2 directory)



Revision 1224 - Directory Listing
Modified Wed Oct 9 21:00:20 2019 UTC (11 months, 1 week ago) by tomek
updated doxygen.cfg (clear config generated from 1.8.15 version)


Revision 1198 - Directory Listing
Modified Wed Jul 31 07:21:10 2019 UTC (13 months, 2 weeks ago) by tomek
updated CHANGELOG



Revision 1197 - Directory Listing
Modified Wed Jul 31 07:14:21 2019 UTC (13 months, 2 weeks ago) by tomek
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 1189 - Directory Listing
Modified Thu Apr 11 16:14:04 2019 UTC (17 months, 1 week ago) by tomek
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 1137 - Directory Listing
Modified Tue Oct 30 21:04:06 2018 UTC (22 months, 2 weeks ago) by tomek
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 1054 - Directory Listing
Modified Sun Mar 12 17:28:38 2017 UTC (3 years, 6 months ago) by tomek
changed: commentaries to be more doxygen friendly



Revision 1053 - Directory Listing
Modified Sun Mar 12 17:13:37 2017 UTC (3 years, 6 months ago) by tomek
changed: commentaries to be more doxygen friendly
changed: put block characters {...} is some places


Revision 1052 - Directory Listing
Modified Sun Mar 12 15:18:16 2017 UTC (3 years, 6 months ago) by tomek
added: makerelease.sh script to generate the source package tarball


Revision 1051 - Directory Listing
Modified Sun Mar 12 14:51:21 2017 UTC (3 years, 6 months ago) by tomek
- changed info in headers in source files: (new) BSD licence -> 3-Clause BSD Licence
- added svn:ignore in some places



Revision 1050 - Directory Listing
Modified Sun Mar 12 12:35:50 2017 UTC (3 years, 6 months ago) by tomek
changed: some return values has been cleaned in ttmathuint.h
         (eclipse builtin parser reported errors but actually the code was correct)


Revision 1049 - Directory Listing
Modified Sun Mar 12 12:34:01 2017 UTC (3 years, 6 months ago) by tomek
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 1047 - Directory Listing
Modified Wed Feb 8 09:02:52 2017 UTC (3 years, 7 months ago) by tomek
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 1046 - Directory Listing
Modified Wed Feb 8 08:42:02 2017 UTC (3 years, 7 months ago) by tomek
fixed: in Object::GetValueAndParam() there was value.empty() used instead of value.clear()


Revision 1045 - Directory Listing
Modified Tue Feb 7 20:42:43 2017 UTC (3 years, 7 months ago) by tomek
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 1044 - Directory Listing
Modified Tue Feb 7 14:24:58 2017 UTC (3 years, 7 months ago) by tomek
updated: CHANGELOG, COPYRIGHT, doxygen.cfg
added:   directory 'res' with logos
added:   empty directory 'doc'



Revision 1043 - Directory Listing
Modified Tue Feb 7 14:19:59 2017 UTC (3 years, 7 months ago) by tomek
changed: get rid of some warnings generated by gcc and clang


Revision 1042 - Directory Listing
Modified Mon Feb 6 02:13:05 2017 UTC (3 years, 7 months ago) by tomek
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 997 - Directory Listing
Modified Fri Nov 28 15:59:08 2014 UTC (5 years, 9 months ago) by tomek
added: CMakeLists.txt files for building samples by using cmake system
       submitted by Mateusz Loskot <mateusz at loskot dot net>

Revision 450 - Directory Listing
Modified Fri Apr 4 23:36:48 2014 UTC (6 years, 5 months ago) by tomek
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 441 - Directory Listing
Modified Thu Jun 13 21:31:53 2013 UTC (7 years, 3 months ago) by tomek
removed: some warning messages generated by GCC from ttmathuint.h (Mul3Big3)

Revision 438 - Directory Listing
Modified Wed Nov 28 16:24:00 2012 UTC (7 years, 9 months ago) by tomek
corrected: the date in CHANGELOG (2012.12->2012.11)


Revision 436 - Directory Listing
Modified Wed Nov 28 16:19:05 2012 UTC (7 years, 9 months ago) by tomek
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 435 - Directory Listing
Modified Tue Oct 30 13:07:38 2012 UTC (7 years, 10 months ago) by tomek
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 381 - Directory Listing
Modified Sat Feb 4 16:26:11 2012 UTC (8 years, 7 months ago) by tomek
added:  ttmath/ttmathdec.h
        starting work on a Decimal template type

Revision 342 - Directory Listing
Modified Sun Feb 27 18:13:32 2011 UTC (9 years, 6 months ago) by tomek
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 340 - Directory Listing
Modified Mon Feb 7 22:37:44 2011 UTC (9 years, 7 months ago) by tomek
changed: UInt::ToString() had O(n^2) complexity
         where n was the number of digits to print
         now it has O(n)


Revision 338 - Directory Listing
Modified Sun Jan 30 17:34:42 2011 UTC (9 years, 7 months ago) by tomek
added: option 'group_digits' to Conv struct
       you can set how many digits should be grouped


Revision 325 - Directory Listing
Modified Thu Oct 14 23:21:16 2010 UTC (9 years, 11 months ago) by tomek
changed: small improvements in UInt::Pow() and Big::Pow()

Revision 324 - Directory Listing
Modified Wed Sep 29 21:14:32 2010 UTC (9 years, 11 months ago) by tomek
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 320 - Directory Listing
Modified Thu Sep 23 20:52:20 2010 UTC (9 years, 11 months ago) by tomek
changing version number to 0.9.2 release

Revision 319 - Directory Listing
Modified Thu Sep 23 19:51:55 2010 UTC (9 years, 11 months ago) by tomek
added TTMATH_LOG to UInt::FromUInt(ulint n)

Revision 318 - Directory Listing
Modified Thu Sep 23 19:25:26 2010 UTC (9 years, 11 months ago) by tomek
fixed: Int::ToUInt(unsigned int & result)
       wrong carry was returned

Revision 317 - Directory Listing
Modified Thu Sep 23 18:56:55 2010 UTC (9 years, 11 months ago) by tomek
added some missing methods: ToUInt, ToInt, FromUInt, FromInt in Big<> class

Revision 316 - Directory Listing
Modified Wed Sep 22 19:43:12 2010 UTC (9 years, 11 months ago) by tomek
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 315 - Directory Listing
Modified Tue Sep 21 22:31:07 2010 UTC (10 years ago) by tomek
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 314 - Directory Listing
Modified Tue Sep 21 15:52:48 2010 UTC (10 years ago) by tomek
removed: macro TTMATH_REFERENCE_ASSERT from all methods from public interface

Revision 313 - Directory Listing
Modified Sun Sep 19 21:58:51 2010 UTC (10 years ago) by tomek
in Big::ToString_CreateNewMantissaTryExponent():
ToString_BaseRound can be called only for non integer values


Revision 312 - Directory Listing
Modified Sun Sep 19 21:54:46 2010 UTC (10 years ago) by tomek
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 311 - Directory Listing
Modified Sun Sep 19 17:23:39 2010 UTC (10 years ago) by tomek
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 310 - Directory Listing
Modified Sat Sep 18 01:35:16 2010 UTC (10 years ago) by tomek
added:   Big::operator++()
         Big::operator++(int)
         Big::operator--()
         Big::operator--(int)
         Big::AddOne()
         Big::SubOne()
changed: Big::SetOne()
         a little faster now


Revision 309 - Directory Listing
Modified Wed Sep 15 20:43:21 2010 UTC (10 years ago) by tomek
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 304 - Directory Listing
Modified Sun Sep 5 18:21:58 2010 UTC (10 years ago) by tomek
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 303 - Directory Listing
Modified Wed Aug 18 23:31:58 2010 UTC (10 years, 1 month ago) by tomek
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 302 - Directory Listing
Modified Wed Aug 18 18:09:16 2010 UTC (10 years, 1 month ago) by tomek
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 301 - Directory Listing
Modified Wed Aug 18 09:22:38 2010 UTC (10 years, 1 month ago) by tomek
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 294 - Directory Listing
Modified Mon Mar 1 13:08:50 2010 UTC (10 years, 6 months ago) by tomek
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 286 - Directory Listing
Modified Sun Feb 7 18:17:24 2010 UTC (10 years, 7 months ago) by tomek
changed: version of the library: 0.9.1 now

Revision 285 - Directory Listing
Modified Sun Feb 7 13:36:39 2010 UTC (10 years, 7 months ago) by tomek
added: to samples: big2.cpp with TTMATH_BITS() macro

Revision 284 - Directory Listing
Modified Tue Feb 2 21:05:08 2010 UTC (10 years, 7 months ago) by tomek
the half-to-even rounding was turned off (some 'return' statement left)

Revision 283 - Directory Listing
Modified Tue Feb 2 21:02:10 2010 UTC (10 years, 7 months ago) by tomek
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 277 - Directory Listing
Modified Wed Jan 6 00:54:01 2010 UTC (10 years, 8 months ago) by tomek
removed: from parser: SetSmallToZero(bool zero)
         this was actually a bad feature

Revision 275 - Directory Listing
Modified Sun Jan 3 01:10:37 2010 UTC (10 years, 8 months ago) by tomek
added: static sint UInt<value_size>::FindLowestBitInWord(uint x)
       (asm_vc_32, asm_gcc_32, no_asm, and intrinsic for vc64)


Revision 274 - Directory Listing
Modified Mon Dec 28 15:41:28 2009 UTC (10 years, 8 months ago) by tomek
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 273 - Directory Listing
Modified Fri Dec 25 22:06:49 2009 UTC (10 years, 8 months ago) by tomek
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 264 - Directory Listing
Modified Mon Dec 14 15:54:23 2009 UTC (10 years, 9 months ago) by tomek
fixed: I have forgotten to remove rounding down from division (Big::div)

Revision 263 - Directory Listing
Modified Mon Dec 14 12:16:32 2009 UTC (10 years, 9 months ago) by tomek
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 262 - Directory Listing
Modified Sat Dec 12 20:45:18 2009 UTC (10 years, 9 months ago) by tomek
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 259 - Directory Listing
Modified Sun Dec 6 23:18:05 2009 UTC (10 years, 9 months ago) by tomek
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 258 - Directory Listing
Modified Sun Dec 6 01:09:55 2009 UTC (10 years, 9 months ago) by tomek
added:   IEEE 754 half-to-even rounding (bankers' rounding) to the following
         floating point algorithms:
         Big::Add
         Big::Sub
         Big::Mul
         Big::Div


Revision 256 - Directory Listing
Modified Sat Dec 5 18:13:53 2009 UTC (10 years, 9 months ago) by tomek
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 255 - Directory Listing
Modified Wed Dec 2 11:38:17 2009 UTC (10 years, 9 months ago) by tomek
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 251 - Directory Listing
Modified Wed Nov 25 13:49:38 2009 UTC (10 years, 9 months ago) by tomek
changed: version of the library: 0.9.0 now

Revision 250 - Directory Listing
Modified Wed Nov 25 12:57:06 2009 UTC (10 years, 9 months ago) by tomek
added: UInt::operator>>(int)
       UInt::operator>>=(int)
       UInt::operator<<(int)
       UInt::operator<<=(int)


Revision 248 - Directory Listing
Modified Tue Nov 24 20:39:36 2009 UTC (10 years, 9 months ago) by tomek
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 247 - Directory Listing
Modified Tue Nov 24 20:15:46 2009 UTC (10 years, 9 months ago) by tomek
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 245 - Directory Listing
Modified Tue Nov 24 06:12:46 2009 UTC (10 years, 9 months ago) by tomek
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 244 - Directory Listing
Modified Tue Nov 24 05:14:54 2009 UTC (10 years, 9 months ago) by tomek
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 238 - Directory Listing
Modified Mon Nov 9 17:42:10 2009 UTC (10 years, 10 months ago) by tomek
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 231 - Directory Listing
Modified Sun Nov 1 20:26:01 2009 UTC (10 years, 10 months ago) by tomek
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 230 - Directory Listing
Modified Sun Nov 1 14:20:48 2009 UTC (10 years, 10 months ago) by tomek
added: to the parser: function frac() - remains fraction

Revision 229 - Directory Listing
Modified Sun Nov 1 13:41:29 2009 UTC (10 years, 10 months ago) by tomek
added: Big::Sqrt()
       global algorithm ttmath::Sqrt() moved to Big::Sqrt()

Revision 228 - Directory Listing
Modified Sun Nov 1 13:26:19 2009 UTC (10 years, 10 months ago) by tomek
added: UInt::Sqrt() - a new algorithm for calculating the square root

Revision 226 - Directory Listing
Modified Sun Nov 1 01:40:40 2009 UTC (10 years, 10 months ago) by tomek
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 224 - Directory Listing
Modified Sun Oct 25 16:42:41 2009 UTC (10 years, 10 months ago) by tomek
updated: CHANGELOG and README

Revision 217 - Directory Listing
Modified Sun Oct 18 12:37:14 2009 UTC (10 years, 11 months ago) by tomek
added: to the parser: operator percentage
       e.g. 1000-50%=1000-(1000*0,5)=500


Revision 213 - Directory Listing
Modified Fri Oct 16 16:56:49 2009 UTC (10 years, 11 months ago) by tomek
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 210 - Directory Listing
Modified Thu Oct 15 01:34:13 2009 UTC (10 years, 11 months ago) by tomek
fixed:   buffer overflow in Big::ToInt(Int<int_size> & result)
changed: small optimization in ToInt(Int<int_size> & result)

Revision 207 - Directory Listing
Modified Tue Oct 13 22:38:08 2009 UTC (10 years, 11 months ago) by tomek
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 206 - Directory Listing
Modified Mon Oct 12 23:27:14 2009 UTC (10 years, 11 months ago) by tomek
removed: Big::AboutEqualWithoutSign()
         it was broken (it lacks the case when either 'this' or 'ss2' is zero)

Revision 205 - Directory Listing
Modified Mon Oct 12 23:25:35 2009 UTC (10 years, 11 months ago) by tomek
changed: Big::AboutEqual()
         it lacks the case when either 'this' or 'ss2' is zero

Revision 203 - Directory Listing
Modified Sat Oct 3 01:10:08 2009 UTC (10 years, 11 months ago) by tomek
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 202 - Directory Listing
Modified Sun Sep 20 20:41:11 2009 UTC (11 years ago) by tomek
changed: if TTMATH_DEBUG_LOG is defined then TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE is always 3
         (regardless of the compiler)

Revision 201 - Directory Listing
Modified Sun Sep 20 20:10:29 2009 UTC (11 years ago) by tomek
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 200 - Directory Listing
Modified Sun Sep 20 12:47:44 2009 UTC (11 years ago) by tomek
changed: small changes in UInt::Div_CalculatingSize()
         some warnings were raported by GCC
         (uninitialized variable)

Revision 198 - Directory Listing
Modified Thu Sep 17 23:18:11 2009 UTC (11 years ago) by tomek
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 194 - Directory Listing
Modified Sun Sep 13 19:29:29 2009 UTC (11 years ago) by tomek
small optimization in Parser::Parse(const wchar_t *)

Revision 193 - Directory Listing
Modified Sun Sep 13 19:16:42 2009 UTC (11 years ago) by tomek
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 192 - Directory Listing
Modified Fri Sep 11 23:55:44 2009 UTC (11 years ago) by tomek
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 191 - Directory Listing
Modified Fri Sep 11 20:48:52 2009 UTC (11 years ago) by tomek
changed: removing some MS VC warnings when compiling x86_64 target

Revision 190 - Directory Listing
Modified Fri Sep 11 04:24:42 2009 UTC (11 years ago) by tomek
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 189 - Directory Listing
Modified Thu Sep 10 16:28:05 2009 UTC (11 years ago) by tomek
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 187 - Directory Listing
Modified Mon Sep 7 02:03:00 2009 UTC (11 years ago) by tomek
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 186 - Directory Listing
Modified Sat Sep 5 16:43:38 2009 UTC (11 years ago) by tomek
merged: AboutEqual() from chk branch
deleted: properties svn:mime-type from ttmath.h
         (it was for testing viewvc)

Revision 185 - Directory Listing
Modified Mon Aug 24 05:08:13 2009 UTC (11 years ago) by tomek
setting svn:mime-type to text/plain for ttmath.h

Revision 184 - Directory Listing
Modified Tue Aug 4 18:55:18 2009 UTC (11 years, 1 month ago) by tomek
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 183 - Directory Listing
Modified Tue Aug 4 18:23:35 2009 UTC (11 years, 1 month ago) by tomek
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 178 - Directory Listing
Modified Thu Jul 16 03:22:29 2009 UTC (11 years, 2 months ago) by tomek
* 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 177 - Directory Listing
Modified Thu Jul 2 01:04:25 2009 UTC (11 years, 2 months ago) by tomek
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 164 - Directory Listing
Modified Tue Jun 16 18:33:20 2009 UTC (11 years, 3 months ago) by tomek
updated changelog to previous commit

Revision 163 - Directory Listing
Modified Tue Jun 16 18:31:39 2009 UTC (11 years, 3 months ago) by tomek
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 161 - Directory Listing
Modified Sun Jun 14 19:55:15 2009 UTC (11 years, 3 months ago) by tomek
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 160 - Directory Listing
Modified Sun Jun 14 18:45:36 2009 UTC (11 years, 3 months ago) by tomek
fixed: (performance) in Big::LnSurrounding1() and Big::ExpSurrounding0()
       we can copy 'old_value = *this' only when 'testing' is true

Revision 158 - Directory Listing
Modified Thu Jun 11 15:03:22 2009 UTC (11 years, 3 months ago) by tomek
fixed: Big::FromDouble() on a 32 bit platform:
       SetNaN() should be SetNan() /*compilation error*/

Revision 157 - Directory Listing
Modified Thu Jun 11 10:04:50 2009 UTC (11 years, 3 months ago) by tomek
fixed: in Big::FromDouble(): SetNaN() should be SetNan();

Revision 156 - Directory Listing
Modified Thu Jun 11 02:31:41 2009 UTC (11 years, 3 months ago) by tomek
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 152 - Directory Listing
Modified Tue May 26 23:13:22 2009 UTC (11 years, 3 months ago) by tomek
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 149 - Directory Listing
Modified Sun May 17 00:04:42 2009 UTC (11 years, 4 months ago) by tomek
changed: a little changes in all asm code
         it should be a little faster

Revision 148 - Directory Listing
Modified Fri May 15 22:27:04 2009 UTC (11 years, 4 months ago) by tomek
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 143 - Directory Listing
Modified Mon May 11 01:50:00 2009 UTC (11 years, 4 months ago) by tomek
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 142 - Directory Listing
Modified Sat May 9 01:34:45 2009 UTC (11 years, 4 months ago) by tomek
changed: corrected spaces in changelog

Revision 138 - Directory Listing
Modified Fri May 8 19:13:25 2009 UTC (11 years, 4 months ago) by tomek
changed: version of the library: 0.8.4

Revision 137 - Directory Listing
Modified Fri May 8 18:40:32 2009 UTC (11 years, 4 months ago) by tomek
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 136 - Directory Listing
Modified Fri May 8 18:14:00 2009 UTC (11 years, 4 months ago) by tomek
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 128 - Directory Listing
Modified Tue May 5 07:47:10 2009 UTC (11 years, 4 months ago) by tomek
fixed: deleted default values for variables in some methods (file ttmathuint_x86.h)
       (they should only be put in declaration)

Revision 127 - Directory Listing
Modified Tue May 5 07:20:10 2009 UTC (11 years, 4 months ago) by tomek
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 126 - Directory Listing
Modified Mon May 4 20:51:12 2009 UTC (11 years, 4 months ago) by tomek
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 125 - Directory Listing
Modified Fri May 1 14:53:21 2009 UTC (11 years, 4 months ago) by tomek
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 120 - Directory Listing
Modified Mon Apr 6 16:34:19 2009 UTC (11 years, 5 months ago) by tomek
changed: version of the library: 0.8.3 now

Revision 117 - Directory Listing
Modified Thu Apr 2 05:21:49 2009 UTC (11 years, 5 months ago) by tomek
added: Objects::IsDefined(const std::string & name)
       returning true if such an object is defined

Revision 113 - Directory Listing
Modified Sat Mar 28 17:40:36 2009 UTC (11 years, 5 months ago) by tomek
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 112 - Directory Listing
Modified Fri Mar 27 22:35:41 2009 UTC (11 years, 5 months ago) by tomek
changed: doxygen.cfg changed lines ends: dos mode to unix mode (\r\n to \n)

Revision 111 - Directory Listing
Modified Fri Mar 27 22:31:54 2009 UTC (11 years, 5 months ago) by tomek
changed: updated CHANGELOG to previous commit

Revision 110 - Directory Listing
Modified Fri Mar 27 22:26:51 2009 UTC (11 years, 5 months ago) by tomek
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 109 - Directory Listing
Modified Wed Mar 25 02:01:42 2009 UTC (11 years, 5 months ago) by tomek
added: '#ifndef __GNUC__' to Big::Pow() where is using '#pragma warning'
       in order to not confuse GCC

Revision 108 - Directory Listing
Modified Wed Mar 25 01:12:00 2009 UTC (11 years, 5 months ago) by tomek
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 107 - Directory Listing
Modified Tue Mar 24 21:10:17 2009 UTC (11 years, 5 months ago) by tomek
changed: current info in CHANGELOG

Revision 106 - Directory Listing
Modified Tue Mar 24 20:34:33 2009 UTC (11 years, 5 months ago) by tomek
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 105 - Directory Listing
Modified Thu Mar 12 20:54:46 2009 UTC (11 years, 6 months ago) by tomek
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 104 - Directory Listing
Modified Wed Mar 11 19:05:13 2009 UTC (11 years, 6 months ago) by tomek
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 103 - Directory Listing
Modified Sat Mar 7 22:54:42 2009 UTC (11 years, 6 months ago) by tomek
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 102 - Directory Listing
Modified Wed Mar 4 22:04:36 2009 UTC (11 years, 6 months ago) by tomek
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 101 - Directory Listing
Modified Tue Mar 3 20:41:00 2009 UTC (11 years, 6 months ago) by tomek
changed: UInt::Div3_Normalize - faster now

Revision 97 - Directory Listing
Modified Tue Feb 17 11:37:12 2009 UTC (11 years, 7 months ago) by tomek
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 96 - Directory Listing
Modified Mon Feb 16 18:11:38 2009 UTC (11 years, 7 months ago) by tomek
added: tests: addtwoints for 64bits

Revision 95 - Directory Listing
Modified Mon Feb 16 17:57:34 2009 UTC (11 years, 7 months ago) by tomek
changed: UInt::FromString(...) skips the input digits when the value is too big
added: tests: addtwoints (only 32bit)

Revision 85 - Directory Listing
Modified Fri Oct 31 20:43:08 2008 UTC (11 years, 10 months ago) by tomek
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 84 - Directory Listing
Modified Thu Oct 30 23:38:24 2008 UTC (11 years, 10 months ago) by tomek
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 83 - Directory Listing
Modified Wed Oct 29 21:54:27 2008 UTC (11 years, 10 months ago) by tomek
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 82 - Directory Listing
Modified Sat Oct 25 20:05:51 2008 UTC (11 years, 10 months ago) by tomek
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 81 - Directory Listing
Modified Thu Oct 23 20:17:40 2008 UTC (11 years, 10 months ago) by tomek
added: test of the LAHF and SAHF instructions
       (on a 64bit platform)

Revision 80 - Directory Listing
Modified Wed Oct 22 18:56:04 2008 UTC (11 years, 10 months ago) by tomek
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 79 - Directory Listing
Modified Tue Oct 21 17:42:41 2008 UTC (11 years, 11 months ago) by tomek
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 78 - Directory Listing
Modified Fri Oct 17 09:57:36 2008 UTC (11 years, 11 months ago) by tomek
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 68 - Directory Listing
Modified Wed Jun 18 00:33:05 2008 UTC (12 years, 3 months ago) by tomek
changed: small changes especially cosmetic in documentation (commentaries)
changed: version of the library: now 0.8.2

Revision 67 - Directory Listing
Modified Sat Jun 7 16:17:37 2008 UTC (12 years, 3 months ago) by tomek
changed: info about Big::ToString()
         the changes which were made in revision 60 and 63
	 (I forgot to change the info there)

Revision 66 - Directory Listing
Modified Sat Jun 7 14:07:59 2008 UTC (12 years, 3 months ago) by tomek
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 63 - Directory Listing
Modified Sat Apr 12 08:46:09 2008 UTC (12 years, 5 months ago) by tomek
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 61 - Directory Listing
Modified Wed Jan 23 23:45:42 2008 UTC (12 years, 7 months ago) by tomek
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 60 - Directory Listing
Modified Sun Dec 9 20:07:45 2007 UTC (12 years, 9 months ago) by tomek
added: 'decimal_point' parameter into Big::ToString(...)
fixed: Big::operator>> didn't use TTMATH_COMMA_CHARACTER_2 macro

Revision 58 - Directory Listing
Modified Fri Nov 9 13:28:36 2007 UTC (12 years, 10 months ago) by tomek
fixed: there was an error in Big::FromInt(Int<int_size> value)
	SetSign() was used before the object was initialized

Revision 56 - Directory Listing
Modified Sun Nov 4 21:56:04 2007 UTC (12 years, 10 months ago) by tomek
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 49 - Directory Listing
Modified Sun Jul 29 22:42:45 2007 UTC (13 years, 1 month ago) by tomek
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 48 - Directory Listing
Modified Mon Jul 23 21:29:27 2007 UTC (13 years, 2 months ago) by tomek
added: a method Big::FromDouble(double) for 64bit platforms

Revision 47 - Directory Listing
Modified Sun Jul 22 23:20:09 2007 UTC (13 years, 2 months ago) by tomek
added: method Big::FromDouble(double) which converts from
       standard double into a Big<> (only 32bit platforms)

Revision 46 - Directory Listing
Modified Sun Jul 22 14:15:44 2007 UTC (13 years, 2 months ago) by tomek
changed: the parser is allowed to recognize values which
         begin with a dot, e.g '.5' is treated as '0.5'

Revision 42 - Directory Listing
Modified Sun May 27 23:33:47 2007 UTC (13 years, 3 months ago) by tomek
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 41 - Directory Listing
Modified Mon Apr 23 21:35:55 2007 UTC (13 years, 5 months ago) by tomek
added: Uint::BitNot2() this method has been proposed by
       Arek <kmicicc AnTispam users.sourceforge.net>

Revision 38 - Directory Listing
Modified Tue Apr 17 13:42:19 2007 UTC (13 years, 5 months ago) by tomek
changed: the way of parsing operators in the mathematical parser
         (the parser is not too much greedy now)

Revision 36 - Directory Listing
Modified Fri Apr 13 18:14:11 2007 UTC (13 years, 5 months ago) by tomek
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 35 - Directory Listing
Modified Thu Apr 12 17:17:22 2007 UTC (13 years, 5 months ago) by tomek
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 34 - Directory Listing
Modified Wed Apr 11 22:14:17 2007 UTC (13 years, 5 months ago) by tomek
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 33 - Directory Listing
Modified Sat Apr 7 22:21:31 2007 UTC (13 years, 5 months ago) by tomek
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 32 - Directory Listing
Modified Thu Apr 5 19:08:15 2007 UTC (13 years, 5 months ago) by tomek
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 25 - Directory Listing
Modified Wed Mar 28 22:27:57 2007 UTC (13 years, 5 months ago) by tomek
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 24 - Directory Listing
Modified Wed Mar 21 16:01:50 2007 UTC (13 years, 6 months ago) by tomek
added: into the parser: SetFactorialMax()

Revision 23 - Directory Listing
Modified Fri Mar 9 19:05:38 2007 UTC (13 years, 6 months ago) by tomek
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 19 - Directory Listing
Modified Wed Feb 28 17:52:53 2007 UTC (13 years, 6 months ago) by tomek
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 17 - Directory Listing
Modified Tue Feb 27 20:18:33 2007 UTC (13 years, 6 months ago) by tomek
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 16 - Directory Listing
Modified Sat Feb 24 18:59:05 2007 UTC (13 years, 6 months ago) by tomek
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 15 - Directory Listing
Modified Thu Feb 8 17:56:35 2007 UTC (13 years, 7 months ago) by tomek
added: ErrorCode::err_still_calculating (it's used when there is more than one thread)

Revision 13 - Directory Listing
Modified Mon Feb 5 17:40:23 2007 UTC (13 years, 7 months ago) by tomek
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 12 - Directory Listing
Modified Mon Jan 29 17:58:18 2007 UTC (13 years, 7 months ago) by tomek
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 3 - Directory Listing
Modified Mon Jan 22 20:25:45 2007 UTC (13 years, 8 months ago) by tomek
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 1 - Directory Listing
Added Sun Jan 21 20:02:44 2007 UTC (13 years, 8 months ago) by tomek
initial import