mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 04:30:19 +02:00
(scm_difference): Correction to bignum - negative inum.
This commit is contained in:
parent
fde791b502
commit
708f22c6af
1 changed files with 4 additions and 1 deletions
|
@ -3370,7 +3370,10 @@ scm_difference (SCM x, SCM y)
|
|||
{
|
||||
SCM result = scm_i_mkbig ();
|
||||
|
||||
if (yy >= 0)
|
||||
mpz_sub_ui (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (x), yy);
|
||||
else
|
||||
mpz_add_ui (SCM_I_BIG_MPZ (result), SCM_I_BIG_MPZ (x), -yy);
|
||||
scm_remember_upto_here_1 (x);
|
||||
|
||||
if ((sgn_x < 0 && (yy > 0)) || ((sgn_x > 0) && yy < 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue