diff options
author | tege <tege@gmplib.org> | 1996-05-08 09:42:34 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 1996-05-08 09:42:34 +0200 |
commit | 1b3800a70cb14a22a458594f31c896f7b7a42f93 (patch) | |
tree | 0ebf847260f4765d5411fded355fe7673fc0f571 /mpf/sqrt.c | |
parent | 3dacca0bd7a2b73ff2d074ce18cdd3a78336ddf4 (diff) | |
download | gmp-1b3800a70cb14a22a458594f31c896f7b7a42f93.tar.gz |
Changes from tiny.
Diffstat (limited to 'mpf/sqrt.c')
-rw-r--r-- | mpf/sqrt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mpf/sqrt.c b/mpf/sqrt.c index a0cc4ddb7..6d115e411 100644 --- a/mpf/sqrt.c +++ b/mpf/sqrt.c @@ -19,10 +19,6 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* This code is just correct if "unsigned char" has at least 8 bits. It - doesn't help to use CHAR_BIT from limits.h, as the real problem is - the static arrays. */ - #include "gmp.h" #include "gmp-impl.h" @@ -44,8 +40,8 @@ mpf_sqrt (r, u) usize = u->_mp_size; if (usize <= 0) { - usize = 1 / usize > 0; /* Divide by zero for negative OP. */ - r->_mp_size = 0; + usize = 1 - 1 / (usize == 0); /* Divide by zero for negative OP. */ + r->_mp_size = usize; /* cheat flow by using usize here */ r->_mp_exp = 0; return; } |