summaryrefslogtreecommitdiff
path: root/src/div_ui.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-30 09:57:36 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-06-30 09:57:36 +0000
commitdb110f3c56448f3084cc474bf4185ee2486ae96b (patch)
tree24f505fec32f9b67f9820330704f60a79bf9ada8 /src/div_ui.c
parent4be6dad958efb74af2abde7c50f654ebcbb4d7d2 (diff)
downloadmpfr-db110f3c56448f3084cc474bf4185ee2486ae96b.tar.gz
New macros for mpfr_{mul,div}_ui to optimize the call when the integer
is a constant number that is a power of 2. New macros for mpfr_{mul,div}_si to optimize the call when the integer is a constant number that is positive. (Modified patch from Patrick PĂ©lissier) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9111 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/div_ui.c')
-rw-r--r--src/div_ui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/div_ui.c b/src/div_ui.c
index bed6b6e00..beee07d0d 100644
--- a/src/div_ui.c
+++ b/src/div_ui.c
@@ -24,6 +24,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
#include "mpfr-impl.h"
/* returns 0 if result exact, non-zero otherwise */
+#undef mpfr_div_ui
MPFR_HOT_FUNCTION_ATTR int
mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode)
{
@@ -259,6 +260,7 @@ mpfr_div_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mpfr_rnd_t rnd_mode
return mpfr_check_range (y, inexact, rnd_mode);
}
+#undef mpfr_div_si
int
mpfr_div_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode)
{