about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/mpexp.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-02-14 10:31:09 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-02-14 10:31:09 +0530
commitd6752ccd696c71d23cd3df8fb9cc60b61c32e65a (patch)
tree7fc0fe0151bc004056a5002c1b81c92159988085 /sysdeps/ieee754/dbl-64/mpexp.c
parent70d9946a44ba381f81eb08c71cc150315cc112ad (diff)
downloadglibc-d6752ccd696c71d23cd3df8fb9cc60b61c32e65a.tar.gz
glibc-d6752ccd696c71d23cd3df8fb9cc60b61c32e65a.tar.xz
glibc-d6752ccd696c71d23cd3df8fb9cc60b61c32e65a.zip
New __sqr function as a faster special case of __mul
Diffstat (limited to 'sysdeps/ieee754/dbl-64/mpexp.c')
-rw-r--r--sysdeps/ieee754/dbl-64/mpexp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/dbl-64/mpexp.c b/sysdeps/ieee754/dbl-64/mpexp.c
index 5b3ff04222..565c6c8531 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.c
+++ b/sysdeps/ieee754/dbl-64/mpexp.c
@@ -145,14 +145,14 @@ __mpexp (mp_no *x, mp_no *y, int p)
   /* Raise polynomial value to the power of 2**m. Put result in y.  */
   for (k = 0, j = 0; k < m;)
     {
-      __mul (&mpt2, &mpt2, &mpt1, p);
+      __sqr (&mpt2, &mpt1, p);
       k++;
       if (k == m)
 	{
 	  j = 1;
 	  break;
 	}
-      __mul (&mpt1, &mpt1, &mpt2, p);
+      __sqr (&mpt1, &mpt2, p);
       k++;
     }
   if (j)