From 0271766c8869f270ed80996e02df6c52b6972bb8 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Thu, 31 May 2012 20:49:24 +0200 Subject: Use workctx instead of ctx for cosmetic reasons. Also zero-pad the result in the simple path (not correctly rounded but faster). --- Modules/_decimal/libmpdec/mpdecimal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c index 801b9a1..f6fefb9 100644 --- a/Modules/_decimal/libmpdec/mpdecimal.c +++ b/Modules/_decimal/libmpdec/mpdecimal.c @@ -4168,7 +4168,7 @@ mpd_qexp(mpd_t *result, const mpd_t *a, const mpd_context_t *ctx, if (mpd_isspecial(result) || mpd_iszerocoeff(result) || mpd_qcmp(&t1, &t2, status) == 0) { workctx.clamp = ctx->clamp; - _mpd_zeropad(result, ctx, status); + _mpd_zeropad(result, &workctx, status); mpd_check_underflow(result, &workctx, status); mpd_qfinalize(result, &workctx, status); break; @@ -4182,6 +4182,7 @@ mpd_qexp(mpd_t *result, const mpd_t *a, const mpd_context_t *ctx, } else { _mpd_qexp(result, a, &workctx, status); + _mpd_zeropad(result, &workctx, status); mpd_check_underflow(result, &workctx, status); mpd_qfinalize(result, &workctx, status); } -- cgit v0.12