This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

numbers.[ch]


Hello!

Motivated by the discussion about guile and gmp, I took a look at
numbers.[ch] in libguile. I realized that there are functions / macros
declared in numbers.h which are only used within numbers.c (if at all). An
example for such a function is mkbig, an example for a macro which is
defined but seems never to be used is NUM2DBL. 

mkbig is a constructor for a bignum, while NUM2DBL seems to be obsolete
because there already is a function scm_num2dbl.

If there is interest, I could take a closer look which functions could be
made static in numbers.c and provide a patch.

This would be a step towards hiding the implementation details of bignums,
maybe in order to make changing to a different bignum implementation
easier. E.g. guile is still lacking support for rationals. Not that I'm in
need for bignums or rationals, but guile would remain incomplete without
effective support for those. 

Best regards, 
Dirk Herrmann