summaryrefslogtreecommitdiff
path: root/libguile/eq.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2022-01-05 21:12:01 +0100
committerAndy Wingo <wingo@pobox.com>2022-01-13 09:37:16 +0100
commit7c53325c31b86198b6c021c5c2b62c3742363619 (patch)
treeb608179140e6f2c8b9b70cc387fbb8700648db36 /libguile/eq.c
parentf2390e510fb9f5273b007a90270b5226115e5352 (diff)
downloadguile-7c53325c31b86198b6c021c5c2b62c3742363619.tar.gz
Fix scm_integer_to_double_z to always round; clean ups
* libguile/integers.c (scm_integer_to_double_z): Doubles that can't be exactly represented as integers should round. (bignum_frexp_z): New helper. (scm_integer_from_mpz, scm_integer_from_double): New internal functions. * libguile/numbers.h: * libguile/numbers.c (scm_i_bigcmp, scm_i_dbl2big, scm_i_dbl2num): Remove unused internal functions. (scm_inexact_to_exact): Rework to avoid scm_i_dbl2big. (scm_bigequal): Move here, from eq.c. (scm_integer_to_double_z): Use the new helper. (scm_i_big2dbl): Use scm_integer_to_double_z.
Diffstat (limited to 'libguile/eq.c')
-rw-r--r--libguile/eq.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libguile/eq.c b/libguile/eq.c
index 5d8c19a71..6870613c1 100644
--- a/libguile/eq.c
+++ b/libguile/eq.c
@@ -1,4 +1,4 @@
-/* Copyright 1995-1998,2000-2001,2003-2004,2006,2009-2011,2017-2018
+/* Copyright 1995-1998,2000-2001,2003-2004,2006,2009-2011,2017-2018,2022
Free Software Foundation, Inc.
This file is part of Guile.
@@ -132,12 +132,6 @@ scm_real_equalp (SCM x, SCM y)
}
SCM
-scm_bigequal (SCM x, SCM y)
-{
- return scm_from_bool (scm_i_bigcmp (x, y) == 0);
-}
-
-SCM
scm_complex_equalp (SCM x, SCM y)
{
return scm_from_bool (real_eqv (SCM_COMPLEX_REAL (x),