diff options
author | Andy Wingo <wingo@pobox.com> | 2021-12-03 22:34:09 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2022-01-13 09:37:16 +0100 |
commit | 31da9be6c49eb14c2292312ba9cff737a3a107e6 (patch) | |
tree | 737806097926e28bf9f74d34b44012cec3cae8e7 /libguile/integers.h | |
parent | 44c654aa3e40a86b488ba189be66aee661999cae (diff) | |
download | guile-31da9be6c49eb14c2292312ba9cff737a3a107e6.tar.gz |
Implement floor-quotient with new integer lib
* libguile/integers.c (scm_integer_floor_quotient_ii)
(scm_integer_floor_quotient_iz, scm_integer_floor_quotient_zi)
(scm_integer_floor_quotient_zz): New internal functions.
(long_to_scm, ulong_to_scm, take_bignum_from_mpz): New helpers.
* libguile/integers.h: Declare internal functions.
* libguile/numbers.c (scm_floor_quotient): Use the new functions.
Diffstat (limited to 'libguile/integers.h')
-rw-r--r-- | libguile/integers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libguile/integers.h b/libguile/integers.h index 753ff1f74..99e4246cd 100644 --- a/libguile/integers.h +++ b/libguile/integers.h @@ -29,6 +29,11 @@ SCM_INTERNAL int scm_is_integer_odd_z (SCM z); SCM_INTERNAL SCM scm_integer_abs_i (scm_t_inum i); SCM_INTERNAL SCM scm_integer_abs_z (SCM z); +SCM_INTERNAL SCM scm_integer_floor_quotient_ii (scm_t_inum x, scm_t_inum y); +SCM_INTERNAL SCM scm_integer_floor_quotient_iz (scm_t_inum x, SCM y); +SCM_INTERNAL SCM scm_integer_floor_quotient_zi (SCM x, scm_t_inum y); +SCM_INTERNAL SCM scm_integer_floor_quotient_zz (SCM x, SCM y); + #endif /* SCM_INTEGERS_H */ |