about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/atest-exp.c8
-rw-r--r--math/atest-exp2.c8
-rw-r--r--math/atest-sincos.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/math/atest-exp.c b/math/atest-exp.c
index 28e572c444..4cab953e46 100644
--- a/math/atest-exp.c
+++ b/math/atest-exp.c
@@ -67,9 +67,9 @@ exp_mpn (mp1 ex, mp1 x)
 
    memset (xp, 0, sizeof (mp1));
    memset (ex, 0, sizeof (mp1));
-   xp[FRAC / mpbpl] = 1 << FRAC % mpbpl;
+   xp[FRAC / mpbpl] = (mp_limb_t)1 << FRAC % mpbpl;
    memset (tol,0, sizeof (mp1));
-   tol[(FRAC - TOL) / mpbpl] = 1 << (FRAC - TOL) % mpbpl;
+   tol[(FRAC - TOL) / mpbpl] = (mp_limb_t)1 << (FRAC - TOL) % mpbpl;
 
    n = 0;
 
@@ -119,7 +119,7 @@ main (void)
 
    memset (maxerror, 0, sizeof (mp1));
    memset (xt, 0, sizeof (mp1));
-   xt[(FRAC - N2) / mpbpl] = 1 << (FRAC - N2) % mpbpl;
+   xt[(FRAC - N2) / mpbpl] = (mp_limb_t)1 << (FRAC - N2) % mpbpl;
 
    for (i = 0; i < 1 << N2; i++)
    {
@@ -166,7 +166,7 @@ main (void)
 
    /* Check exp_mpn against precomputed value of exp(1).  */
    memset (x, '\0', sizeof (mp1));
-   x[FRAC / mpbpl] = 1 << FRAC % mpbpl;
+   x[FRAC / mpbpl] = (mp_limb_t)1 << FRAC % mpbpl;
    exp_mpn (ex, x);
 
    memset (e2, '\0', sizeof (mp1));
diff --git a/math/atest-exp2.c b/math/atest-exp2.c
index 1f5d7ccd86..7243944c66 100644
--- a/math/atest-exp2.c
+++ b/math/atest-exp2.c
@@ -107,9 +107,9 @@ exp_mpn (mp1 ex, mp1 x)
 
    memset (xp, 0, sizeof (mp1));
    memset (ex, 0, sizeof (mp1));
-   xp[FRAC / mpbpl] = 1 << FRAC % mpbpl;
+   xp[FRAC / mpbpl] = (mp_limb_t)1 << FRAC % mpbpl;
    memset (tol, 0, sizeof (mp1));
-   tol[(FRAC - TOL) / mpbpl] = 1 << (FRAC - TOL) % mpbpl;
+   tol[(FRAC - TOL) / mpbpl] = (mp_limb_t)1 << (FRAC - TOL) % mpbpl;
 
    n = 0;
 
@@ -170,7 +170,7 @@ main (void)
 
   memset (maxerror, 0, sizeof (mp1));
   memset (xt, 0, sizeof (mp1));
-  xt[(FRAC - N2) / mpbpl] = 1 << (FRAC - N2) % mpbpl;
+  xt[(FRAC - N2) / mpbpl] = (mp_limb_t)1 << (FRAC - N2) % mpbpl;
 
   for (i = 0; i < (1 << N2); ++i)
     {
@@ -219,7 +219,7 @@ main (void)
 
   /* Check exp_mpn against precomputed value of exp(1).  */
   memset (x, 0, sizeof (mp1));
-  x[FRAC / mpbpl] = 1 << FRAC % mpbpl;
+  x[FRAC / mpbpl] = (mp_limb_t)1 << FRAC % mpbpl;
   exp_mpn (ex, x);
   read_mpn_hex (e2, exp1);
   if (mpn_cmp (ex, e2, SZ) >= 0)
diff --git a/math/atest-sincos.c b/math/atest-sincos.c
index 98f1e719b1..2f4187c9c0 100644
--- a/math/atest-sincos.c
+++ b/math/atest-sincos.c
@@ -156,7 +156,7 @@ main (void)
   memset (sin_maxerror, 0, sizeof (mp1));
   memset (cos_maxerror, 0, sizeof (mp1));
   memset (xt, 0, sizeof (mp1));
-  xt[(FRAC - N2) / mpbpl] = 1 << (FRAC - N2) % mpbpl;
+  xt[(FRAC - N2) / mpbpl] = (mp_limb_t)1 << (FRAC - N2) % mpbpl;
 
   for (i = 0; i < 1 << N2; i++)
     {
@@ -232,7 +232,7 @@ main (void)
 
    /* Check Range-Kutta against precomputed values of sin(1) and cos(1).  */
    memset (x, 0, sizeof (mp1));
-   x[FRAC / mpbpl] = 1 << FRAC % mpbpl;
+   x[FRAC / mpbpl] = (mp_limb_t)1 << FRAC % mpbpl;
    sincosx_mpn (si, co, x, ox);
 
    memset (s2, 0, sizeof (mp1));