Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix denominator of roundto result | Max Nikulin | 2024-08-05 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | | | Multiprecision rational created from a double value may have large power of 2 denominator since fractional decimal numbers can not be represented as binary floating point numbers. It leads to failed assertion when result is compared to a value converted directly from strings. Use integer multiprecision arithmetics to round numbers to ensure proper denominator. Inspired by python gmpy2 package <https://github.com/aleaxit/gmpy/blob/3e4564ae9d/src/gmpy2_mpq_misc.c#L315> The change makes `roundto` symmetric for positive/negative arguments. Halves are rounded to nearest even. Rounded away from zero are discussed in #1663 and it may be achieved with minimal modification. - See #2329 - Closes #1983 | ||||
* | [tests] Fix compiler warning | Alexis Hildebrandt | 2015-01-11 | 1 | -0/+3 |
| | |||||
* | Revert "add unit test printing for balance_t" until issue is fixed. | tripun | 2014-08-11 | 1 | -31/+0 |
| | | | | | | Getting different output on system than travis-ci. This reverts commit 272e3cb3799937dcd3c379de56b299a3cbde52ca. | ||||
* | add unit test printing for balance_t | tripun | 2014-08-11 | 1 | -0/+31 |
| | |||||
* | add unit test of Zero for balance_t | tripun | 2014-08-11 | 1 | -0/+26 |
| | |||||
* | add unit test Truth for balance_t | tripun | 2014-08-11 | 1 | -0/+20 |
| | |||||
* | add unit test Round for balance_t | tripun | 2014-08-11 | 1 | -0/+50 |
| | |||||
* | add unit test Floor for balance_t | tripun | 2014-08-11 | 1 | -0/+43 |
| | |||||
* | add unit test Ceiling for balance_t | tripun | 2014-08-11 | 1 | -0/+43 |
| | |||||
* | add unit test Absolute for balance_t | tripun | 2014-08-11 | 1 | -0/+25 |
| | |||||
* | add unit test negation for balance_t | tripun | 2014-08-11 | 1 | -0/+35 |
| | |||||
* | add unit test for balance division | tripun | 2014-08-11 | 1 | -0/+45 |
| | |||||
* | add test for multiplication | tripun | 2014-08-11 | 1 | -0/+45 |
| | |||||
* | edited subraction test | tripun | 2014-08-11 | 1 | -1/+1 |
| | |||||
* | add Equality unit test for balance | tripun | 2014-08-11 | 1 | -2/+65 |
| | |||||
* | added boost subtraction unit test | tripun | 2014-08-11 | 1 | -0/+39 |
| | |||||
* | added balance addition unit test | tripun | 2014-08-11 | 1 | -4/+42 |
| | |||||
* | add balance Test constructors | tripun | 2014-08-11 | 1 | -2/+22 |
| | |||||
* | Fixed several unit tests | John Wiegley | 2011-02-04 | 1 | -9/+9 |
| | |||||
* | Use Boost.Test instead of CppUnit | John Wiegley | 2011-02-04 | 1 | -20/+24 |
| | |||||
* | Call times_initialize/shutdown in the unit tests | John Wiegley | 2009-10-25 | 1 | -0/+2 |
| | |||||
* | Enabled use of pre-compiled headers by default | John Wiegley | 2009-03-10 | 1 | -0/+2 |
| | |||||
* | Restored the use of Python unit tests | John Wiegley | 2009-02-24 | 1 | -4/+0 |
| | |||||
* | Fixed several unused value and param warnings | John Wiegley | 2009-02-16 | 1 | -1/+0 |
| | |||||
* | Unit test for Python are now auto-generated from the C++ tests. | John Wiegley | 2009-01-28 | 1 | -0/+1 |
| | |||||
* | Reorganized Ledger so that it builds as 7 separate libraries. This is mainly | John Wiegley | 2009-01-25 | 1 | -4/+8 |
| | | | | to prove to myself that it has proper decoupling between prior code areas. | ||||
* | Moved the test sources around, so that all the unit tests are in test/unit. | John Wiegley | 2008-08-05 | 1 | -0/+25 |