diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:50:45 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:50:45 +0200 |
commit | 4dd9e35bfd35d3138bc44169baba098005bad51e (patch) | |
tree | a4939c43a9c3fe00eb27f023e14acc5e1fe8808c /sysdeps/ieee754/dbl-64/mpa.c | |
parent | bd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff) | |
parent | f76453c31593957fec1a99b986bfa5506618b79c (diff) |
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'sysdeps/ieee754/dbl-64/mpa.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/mpa.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c index 9f7f44fa48..7b52da91d5 100644 --- a/sysdeps/ieee754/dbl-64/mpa.c +++ b/sysdeps/ieee754/dbl-64/mpa.c @@ -1,7 +1,7 @@ /* * IBM Accurate Mathematical Library * written by International Business Machines Corp. - * Copyright (C) 2001-2014 Free Software Foundation, Inc. + * Copyright (C) 2001-2015 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -50,8 +50,8 @@ #endif #ifndef NO__CONST -const mp_no mpone = { 1, { 1.0, 1.0 } }; -const mp_no mptwo = { 1, { 1.0, 2.0 } }; +const mp_no __mpone = { 1, { 1.0, 1.0 } }; +const mp_no __mptwo = { 1, { 1.0, 2.0 } }; #endif #ifndef NO___ACR @@ -119,7 +119,8 @@ __cpy (const mp_no *x, mp_no *y, int p) #ifndef NO___MP_DBL /* Convert a multiple precision number *X into a double precision - number *Y, normalized case (|x| >= 2**(-1022))). */ + number *Y, normalized case (|x| >= 2**(-1022))). X has precision + P, which is positive. */ static void norm (const mp_no *x, double *y, int p) { @@ -135,7 +136,7 @@ norm (const mp_no *x, double *y, int p) c = X[1] + R * X[2]; else if (p == 3) c = X[1] + R * (X[2] + R * X[3]); - else if (p == 4) + else /* p == 4. */ c = (X[1] + R * X[2]) + R * R * (X[3] + R * X[4]); } else @@ -877,7 +878,7 @@ __inv (const mp_no *x, mp_no *y, int p) { __cpy (y, &w, p); __mul (x, &w, y, p); - __sub (&mptwo, y, &z, p); + __sub (&__mptwo, y, &z, p); __mul (&w, &z, y, p); } } |