summaryrefslogtreecommitdiff
path: root/libguile/integers.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2021-12-19 08:57:06 +0100
committerAndy Wingo <wingo@pobox.com>2022-01-13 09:37:16 +0100
commit1e0797db7289ad27758a1cf77d89105459475ee7 (patch)
tree4a3a4101f8352f0f9bf270378bcff699c89a3f10 /libguile/integers.h
parent025c7c80451c9394cff1e15ce278d34a01a98022 (diff)
downloadguile-1e0797db7289ad27758a1cf77d89105459475ee7.tar.gz
Implement gcd with new integer lib
* libguile/integers.c (scm_integer_gcd_ii) (scm_integer_gcd_zi, scm_integer_gcd_zz): New internal functions. * libguile/integers.h: Declare internal functions. * libguile/numbers.c (scm_gcd): Use the new functions.
Diffstat (limited to 'libguile/integers.h')
-rw-r--r--libguile/integers.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/integers.h b/libguile/integers.h
index e1193c231..699525b3f 100644
--- a/libguile/integers.h
+++ b/libguile/integers.h
@@ -124,6 +124,10 @@ SCM_INTERNAL void scm_integer_round_divide_zi (SCM x, scm_t_inum y,
SCM_INTERNAL void scm_integer_round_divide_zz (SCM x, SCM y,
SCM *qp, SCM *rp);
+SCM_INTERNAL SCM scm_integer_gcd_ii (scm_t_inum x, scm_t_inum y);
+SCM_INTERNAL SCM scm_integer_gcd_zi (SCM x, scm_t_inum y);
+SCM_INTERNAL SCM scm_integer_gcd_zz (SCM x, SCM y);
+
#endif /* SCM_INTEGERS_H */