Fix the R6RS exact-integer-sqrt and import into core guile
authorMark H Weaver <mhw@netris.org>
Wed, 6 Apr 2011 19:09:42 +0000 (15:09 -0400)
committerMark H Weaver <mhw@netris.org>
Sat, 9 Apr 2011 20:11:49 +0000 (16:11 -0400)
commit882c89636a2a4afa26cff17c7cdbc1d8c1cb2745
tree7e713f3a5fc0521fca326a160794021d05d315ad
parentb1e13fb530e0f80334862e440860c054b61dbdd0
Fix the R6RS exact-integer-sqrt and import into core guile

* libguile/numbers.c (scm_exact_integer_sqrt): New C procedure to
  compute exact integer square root and remainder.
  (scm_i_exact_integer_sqrt): New Scheme procedure `exact-integer-sqrt'
  from the R6RS, imported into core guile.

* libguile/numbers.h: Add prototypes.

* module/rnrs/base.scm: Remove broken stub implementation, which would
  fail badly when applied to large integers.

* doc/ref/api-data.texi: Add documentation.

* doc/ref/r6rs.texi: Change documentation for `exact-integer-sqrt' to a
  stub that xrefs the core docs, as is done for other operations
  available in core.

* test-suite/tests/numbers.test: Add tests.

* NEWS: Add news entries.
NEWS
doc/ref/api-data.texi
doc/ref/r6rs.texi
libguile/numbers.c
libguile/numbers.h
module/rnrs/base.scm
test-suite/tests/numbers.test