1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00

Remove useless code from do_divide

* libguile/numbers.c (do_divide): Remove code which handled a case
  that never occurs: a zero bignum.
This commit is contained in:
Mark H Weaver 2011-01-26 02:50:03 -05:00 committed by Andy Wingo
parent 41df63cf16
commit a4955a0412

View file

@ -5123,19 +5123,6 @@ do_divide (SCM x, SCM y, int inexact)
}
}
else if (SCM_BIGP (y))
{
int y_is_zero = (mpz_sgn (SCM_I_BIG_MPZ (y)) == 0);
if (y_is_zero)
{
#ifndef ALLOW_DIVIDE_BY_EXACT_ZERO
scm_num_overflow (s_divide);
#else
int sgn = mpz_sgn (SCM_I_BIG_MPZ (x));
scm_remember_upto_here_1 (x);
return (sgn == 0) ? scm_nan () : scm_inf ();
#endif
}
else
{
/* big_x / big_y */
if (inexact)
@ -5166,7 +5153,6 @@ do_divide (SCM x, SCM y, int inexact)
return scm_i_make_ratio (x, y);
}
}
}
else if (SCM_REALP (y))
{
double yy = SCM_REAL_VALUE (y);