]> granicus.if.org Git - python/commit
1) State the relative errors of the power functions for integer exponents.
authorStefan Krah <skrah@bytereef.org>
Sat, 16 Jun 2012 17:45:35 +0000 (19:45 +0200)
committerStefan Krah <skrah@bytereef.org>
Sat, 16 Jun 2012 17:45:35 +0000 (19:45 +0200)
commitc62bd13cb203f27bc11d36903554f20386b5b8c5
treefc5c9d0e667e9adec55c6a3134132a82fd7f39ab
parentf185226244bdb3ead8c0ff44153d5ef5420464f1
1) State the relative errors of the power functions for integer exponents.

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.
Modules/_decimal/libmpdec/mpdecimal.c