diff options
author | Andy Wingo <wingo@pobox.com> | 2021-12-05 22:28:59 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2022-01-13 09:37:16 +0100 |
commit | 8a6353745898a82322c813d289ed433bb7e597c4 (patch) | |
tree | 25d63ed33240c9f322feb8a20adfedbaab7e37b2 /libguile/integers.h | |
parent | 2e8036ff0f2d76c363527d4d62a76d47ee451773 (diff) | |
download | guile-8a6353745898a82322c813d289ed433bb7e597c4.tar.gz |
Implement floor-divide with new integer lib
* libguile/integers.c (scm_integer_floor_divide_ii)
(scm_integer_floor_divide_iz, scm_integer_floor_divide_zi)
(scm_integer_floor_divide_zz): New internal functions.
* libguile/integers.h: Declare internal functions.
* libguile/numbers.c (scm_floor_divide): Use the new functions.
Diffstat (limited to 'libguile/integers.h')
-rw-r--r-- | libguile/integers.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libguile/integers.h b/libguile/integers.h index 671d32ae3..7c3c3c030 100644 --- a/libguile/integers.h +++ b/libguile/integers.h @@ -39,6 +39,15 @@ SCM_INTERNAL SCM scm_integer_floor_remainder_iz (scm_t_inum x, SCM y); SCM_INTERNAL SCM scm_integer_floor_remainder_zi (SCM x, scm_t_inum y); SCM_INTERNAL SCM scm_integer_floor_remainder_zz (SCM x, SCM y); +SCM_INTERNAL void scm_integer_floor_divide_ii (scm_t_inum x, scm_t_inum y, + SCM *qp, SCM *rp); +SCM_INTERNAL void scm_integer_floor_divide_iz (scm_t_inum x, SCM y, + SCM *qp, SCM *rp); +SCM_INTERNAL void scm_integer_floor_divide_zi (SCM x, scm_t_inum y, + SCM *qp, SCM *rp); +SCM_INTERNAL void scm_integer_floor_divide_zz (SCM x, SCM y, + SCM *qp, SCM *rp); + #endif /* SCM_INTEGERS_H */ |