summaryrefslogtreecommitdiffstats
path: root/Modules/_decimal/libmpdec
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since ↵Victor Stinner2017-09-121-0/+6
| | | | | | | | | | | | | | | | gcc-7.0 (#3518) * bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142) (cherry picked from commit d73a960c575207539c3f9765cff26d4fff400b45) * bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157) (cherry picked from commit f432a3234f9f2ee09bd40be03e06bf72865ee375) * bpo-31275: Small refactoring to silence a fall-through warning. (#3206) (cherry picked from commit 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b)
* Fix some warnings from MSVCSteve Dower2016-09-071-4/+0
|
* include (now) int standard headersBenjamin Peterson2016-09-061-6/+2
|
* do not need vcstdint.h anymoreBenjamin Peterson2016-09-061-1/+0
|
* Issue #26846: Workaround for non-standard stdlib.h on Android.Stefan Krah2016-04-255-6/+4
|
* Issue #26621: Update libmpdec version and remove unnecessary test case.Stefan Krah2016-03-231-2/+2
|
* Issue #26139: libmpdec: disable /W4 warning (non-standard dllimport behavior).Stefan Krah2016-01-171-0/+5
|
* Issue #24974: Force fp-model precice in mpdecimal.c on WindowsZachary Ware2015-09-031-0/+1
| | | | As suggested by Steve Dower and approved by Stefan Krah.
* Introduce and check for MPD_VERSION_HEX for precise management of buildsStefan Krah2014-08-261-2/+6
| | | | with an external libmpdec.
* Issue #22090: Fix '%' formatting for infinities and NaNs.Stefan Krah2014-08-261-4/+7
|
* Whitespace.Stefan Krah2014-01-041-3/+3
|
* Issue #19986: Avoid an incorrect warning of older gcc versions.Stefan Krah2013-12-151-3/+4
|
* Fix C++ header usage. This __STDC_LIMIT_MACROS scheme can still be subvertedStefan Krah2013-12-141-9/+11
| | | | | by including stdint.h before mpdecimal.h. In that case the only option left is to compile with -D_STDC_LIMIT_MACROS.
* Do not discard const qualifier without a reason.Stefan Krah2013-12-121-7/+7
|
* Fix two typos.Stefan Krah2013-12-082-2/+2
|
* Missed one copyright.Stefan Krah2013-12-081-1/+1
|
* Update copyright. The four year increment is intentional (to save work).Stefan Krah2013-12-0833-33/+33
|
* Make a couple of parameters constant.Stefan Krah2013-12-032-14/+14
|
* 1) Prepare libmpdec for the 2.4.0 release. None of the following changes ↵Stefan Krah2013-11-242-35/+319
| | | | | | | | | | | | | | | | | | affects _decimal: o Make all "mpd_t to C integer" conversion functions available in both the 64-bit and the 32-bit versions. o Make all mixed mpd_t/C integer arithmetic functions available in the 32-bit version. o Better handling of __STDC_LIMIT_MACROS for C++ users. o Add struct tags (at the request of C++ users). 2) Check for libmpdec.so.2 if --with-system-libmpdec is used.
* Fix a few typos and a double semicolon. Patch by Eitan Adler.Ezio Melotti2013-01-271-1/+1
|
* Remove trailing whitespace.Stefan Krah2013-01-1610-22/+22
|
* Issue #16753: Define __GNUC_STDC_INLINE__ to an integer (same as gcc).Stefan Krah2012-12-231-1/+1
|
* Issue #16745: The gcc visibility pragma is buggy on OpenIndiana and NetBSD.Stefan Krah2012-12-221-1/+2
|
* Fix Visual Studio build.Stefan Krah2012-12-221-0/+3
|
* Issue #16745: Hide symbols in _decimal.so.Stefan Krah2012-12-2212-1/+95
|
* Issue #16745: Hide a couple of symbols by making them local.Stefan Krah2012-12-211-7/+7
|
* Support gcc's -ansi flag: use "__asm__" instead of "asm".Stefan Krah2012-09-302-94/+94
|
* Revert 29506c7db353 (build output should be accurate).Stefan Krah2012-09-301-5/+0
|
* Change libmpdec to use ANSI code in strict ansi mode as inline asm isn't ↵Christian Heimes2012-09-301-0/+5
| | | | supported in ANSI C
* Use C-style comments.Stefan Krah2012-09-231-24/+24
|
* mpd_qpowmod(): calculate result with zero-exponent for compatibility withStefan Krah2012-08-231-15/+17
| | | | decimal.py. The hack to remove the ideal exponent is no longer required.
* 1) Use _mpd_basedivmod() regardless of the length of the dividend. This isStefan Krah2012-08-221-6/+9
| | | | | | | | | | required for a corner case in dec_hash() in the following commit and also usually faster. dec_hash() needs some extra precision above MPD_MAX_PREC, and _mpd_base_ndivmod() is not audited for that. 2) Use _mpd_basemul() if the length of the smaller operand is less than or equal to 256. While this is technically an optimization, it is required for *testing* corner cases in dec_hash() in reasonable time.
* Fix Visual Studio warning.Stefan Krah2012-07-201-1/+1
|
* Issue #7652: Clean up _mpd_qinvroot() and mark it LIBMPDEC_ONLY. Use theStefan Krah2012-07-121-135/+140
| | | | algorithm from decimal.py for mpd_qsqrt().
* After 79d2eb29c755 it is no longer necessary to zero the output array:Stefan Krah2012-06-301-4/+4
| | | | | | None of the _mpd_shortadd() or _mpd_shortmul() functions read uninitialized values. Previously zeroing was required since _mpd_real_size() was called on the output array.
* Proactive reliability fix for broken FPUs: The base conversion functionsStefan Krah2012-06-304-180/+389
| | | | | | | | | | use log10() to calculate the size of the output array. The current code has been tested on x86/amd64 (and to a lesser extent on qemu-mips qemu-sparc) and produces sufficiently large values for all inputs tested so far (coefficient sizes of 10**18 - 1 are hard to test exhaustively). The new code does not rely on the correctness of log10() and resizes the output arrays if the allocated space is insufficient.
* Whitespace.Stefan Krah2012-06-221-1/+1
|
* Fix comment.Stefan Krah2012-06-201-1/+1
|
* Many cleanups of redundant code in mpd_qrem_near():Stefan Krah2012-06-201-23/+15
| | | | | | | | | | | | | | | | | | 1) _mpd_qdivmod() uses the context precision only in two places, and the new code should be exactly equivalent to the previous code. 2) Remove misleading comment. 3) The quotient *is* an integer with exponent 0, so calling mpd_qtrunc() is pointless. 4) Replace two instances of identical code by a single one. 5) Use _mpd_cmp_abs() instead of mpd_cmp_total_mag(): the operands are not special. 6) Don't clear MPD_Rounded in the status (with the current code it should not be set within the function).
* Add comments to the power functions, in particular to _mpd_qpow_real().Stefan Krah2012-06-181-5/+34
|
* 1) State the relative errors of the power functions for integer exponents.Stefan Krah2012-06-161-2/+18
| | | | | | | | | | | | | | | 2) _mpd_qpow_mpd(): Abort the loop for all specials, not only infinity. 3) _mpd_qpow_mpd(): Make the function more general and distinguish between zero clamping and folding down the exponent. The latter case is currently handled by setting context->clamp to 0 before calling the function. 4) _mpd_qpow_int(): Add one to the work precision in case of a negative exponent. This is to get the same relative error (0.1 * 10**-prec) for both positive and negative exponents. The previous relative error for negative exponents was (0.2 * 10**-prec). Both errors are _before_ the final rounding to the context precision.
* 1) Fix signature of _mpd_qpow_uint(): contrary to the comment base is constant.Stefan Krah2012-06-121-7/+9
| | | | | | | | 2) Abort the loop for all specials, not only infinity. 3) Make the function more general and distinguish between zero clamping and folding down the exponent. The latter case is currently handled by setting context->clamp to 0 before calling the function.
* 1) Replace long-winded abort() construct by assert().Stefan Krah2012-06-111-31/+28
| | | | | 2) Remove micro optimization (inline checking for NaN before calling mpd_qcheck_nans()) that probably has no benefit in this case.
* 1) State restrictions for the transform length.Stefan Krah2012-06-101-5/+10
| | | | | 2) Switch argument order to match the function signature of mpd_calloc() (cosmetic change, since the order is irrelevant).
* Add one extra comparison to the _mpd_shortmul() case to avoid repetitive code.Stefan Krah2012-06-091-16/+8
|
* Enumerate all cases in the overflow detection strategy in mpd_qlog10().Stefan Krah2012-06-081-4/+17
|
* 1) List relative error for _mpd_qln10().Stefan Krah2012-06-081-9/+29
| | | | | | | 2) Add rigorous error analysis to _mpd_qlog10 (ACL2 proofs exist). 3) Use the relative error as a basis for the interval generation in the correction loop (same as in _mpd_qln()).
* 1) The overflow detection in mpd_qln() has a surprising number of case splits.Stefan Krah2012-06-071-7/+19
| | | | | | | List all of them in the comment. 2) Use the recently stated relative error of _mpd_qln() to generate the interval for the exact value of ln(x). See also the comment in mpd_qexp().
* 1) Add error analysis comments to mpd_qln10() and _mpd_qln().Stefan Krah2012-06-061-31/+96
| | | | 2) Simplify the precision adjustment code for values in [0.900, 1.15].
* word.digits are always initialized before use in the Taylor series loop,Stefan Krah2012-06-011-1/+1
| | | | but this is more readable.