mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 03:00:19 +02:00
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.
This commit is contained in:
parent
44c654aa3e
commit
31da9be6c4
3 changed files with 92 additions and 67 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue