1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

206 commits

Author SHA1 Message Date
Mark H Weaver
475772ea57 Merge branch 'stable-2.0'
Conflicts:
	GUILE-VERSION
	NEWS
	guile-readline/ice-9/readline.scm
	libguile/async.c
	libguile/backtrace.c
	libguile/deprecated.h
	libguile/gc-malloc.c
	libguile/gdbint.c
	libguile/init.c
	libguile/ioext.c
	libguile/mallocs.c
	libguile/print.c
	libguile/rw.c
	libguile/scmsigs.c
	libguile/script.c
	libguile/simpos.c
	libguile/snarf.h
	libguile/strports.c
	libguile/threads.c
	libguile/vm-i-scheme.c
	libguile/vm-i-system.c
	module/srfi/srfi-18.scm
	test-suite/Makefile.am
	test-suite/standalone/test-num2integral.c
2014-04-25 02:06:01 -04:00
Mark H Weaver
580ef7fcf4 Documentation tweaks for the 'r7rs-symbols' read/print options.
* doc/ref/api-data.texi (Symbol Read Syntax): Mention the 'r7rs-symbols'
  print option, and provide example code to enable both the read and
  print options.  Add 'r7rs-symbols' to the concept index.
2014-03-17 02:40:23 -04:00
Andy Wingo
c2379a5b45 Doc and NEWS updates
* NEWS: Update section on dynamic stacks.  Add link for intptr
  interfaces.
* doc/ref/api-data.texi (Integers): Add intptr interfaces.
2014-03-16 16:28:28 +01:00
Mark H Weaver
c92ee2b38c Merge branch 'stable-2.0'
Conflicts:
	libguile/print.c
	libguile/read.c
	test-suite/tests/print.test
2014-01-14 22:23:39 -05:00
Mark H Weaver
dc59631d30 read: Support R7RS |...| symbol notation.
* libguile/private-options.h (SCM_R7RS_SYMBOLS_P): New macro.
  (SCM_N_READ_OPTIONS): Increment.

* libguile/read.c (scm_read_opts): Add entry for 'r7rs-symbols'.
  (t_read_opts): Add field for 'r7rs_symbols_p'.
  (scm_read_string_like_syntax): New function based on earlier
  'scm_read_string' that handles either string literals or R7RS quoted
  symbols (delimited by vertical bars), depending on the value of 'chr'.
  (scm_read_string): Reimplement based on 'scm_read_string_like_syntax'.
  (scm_read_r7rs_symbol): New static function.

* doc/ref/api-data.texi (Symbol Read Syntax): Briefly describe the R7RS
  symbol syntax, mention the 'r7rs-symbols' read option, and give some
  examples.

* doc/ref/api-evaluation.texi (Scheme Read): Mention the 'r7rs-symbols'
  read option.

* test-suite/tests/reader.test ("reading"): Add test.
2014-01-14 20:23:21 -05:00
Mark H Weaver
cb8aaef4d0 Merge branch 'stable-2.0'
Conflicts:
	libguile/chars.c
	libguile/read.c
	test-suite/tests/reader.test
2014-01-14 03:18:34 -05:00
Mark H Weaver
394449d5d3 Recognize 'escape' character name, per R7RS.
* libguile/chars.c (scm_r7rs_charnames, scm_r7rs_charnums):
  New static constants.
  (SCM_N_R7RS_CHARNAMES): New macro.
  (scm_i_charname, scm_i_charname_to_char): Adapt to new R7RS
  char names.

* doc/ref/api-data.texi (Characters): Document #\escape.

* test-suite/tests/reader.test ("reading"): Add test.
2014-01-14 02:24:44 -05:00
Mark H Weaver
6579c3308d read: Accept "\|" in string literals.
* libguile/read.c (scm_read_string): Accept "\|" in string literals.

* doc/ref/api-data.texi (String Syntax): Add "\|" to the list of
  supported backslash escapes.

* test-suite/tests/reader.test ("reading"): Add test.
2014-01-14 02:24:37 -05:00
Mark H Weaver
7a329029cf read: Support R7RS '#true' and '#false' syntax for booleans.
* libguile/read.c (try_read_ci_chars): New static function.
  (scm_read_boolean, scm_read_array): Use 'try_read_ci_chars'.

* doc/ref/api-data.texi (Booleans): Update docs.

* test-suite/tests/reader.test ("reading"): Add tests.
2014-01-14 02:24:24 -05:00
Mark H Weaver
1df515a077 Merge branch 'stable-2.0'
Conflicts:
	module/system/vm/traps.scm
	test-suite/tests/peval.test
2014-01-09 02:52:34 -05:00
Mark H Weaver
900a897cd3 Implement 'exact-integer?' and 'scm_is_exact_integer'.
* libguile/numbers.c (scm_exact_integer_p, scm_is_exact_integer):
  New procedures.
  (scm_integer_p): Improve docstring.

* libguile/numbers.h (scm_exact_integer_p, scm_is_exact_integer):
  New prototypes.

* doc/ref/api-data.texi (Integers): Add docs.

* test-suite/tests/numbers.test ("exact-integer?"): Add tests.
2014-01-08 21:42:16 -05:00
Mark H Weaver
f659df4495 Fix doc that incorrectly claimed (integer? +inf.0) => #t.
Fixes <http://bugs.gnu.org/16356>.
Reported by Zefram <zefram@fysh.org>.

* doc/ref/api-data.texi (Integers): Add docs.  Fix outdated example
  that incorrectly showed (integer? +inf.0) => #t.
2014-01-08 21:41:37 -05:00
Mark H Weaver
f6f4feb0a2 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/array-map.c
	libguile/fports.h
	libguile/gc.h
	libguile/inline.h
	libguile/ports.c
	libguile/ports.h
	libguile/print.c
	libguile/r6rs-ports.c
	libguile/read.c
	test-suite/tests/00-socket.test
2013-04-14 02:48:33 -04:00
Mark H Weaver
a71e79c3e5 Fix the recommendations for conversion of C string constants.
* doc/ref/api-data.texi (Conversion to/from C, Symbol Primitives,
  Keyword Procedures): Fix the recommendations for conversion of C
  string constants.  The encoding of the source code is irrelevant in
  modern compilers.  What is relevant is the execution character set.
  Both GCC and clang use UTF-8 by default, so recommend the
  'scm_from_utf8_*' functions when the argument is a C string constant.

  Also fix the broken texinfo markup for 'scm_from_*_symbol' that
  prevented them from being listed in the index.
2013-04-06 18:37:29 -04:00
Mark H Weaver
a16d4e82e9 Implement 'scm_c_bind_keyword_arguments'.
* libguile/keywords.c (scm_keyword_argument_error): New variable.
  (scm_c_bind_keyword_arguments): New API function.

* libguile/keywords.h (enum scm_keyword_arguments_flags): New enum.
  (scm_t_keyword_arguments_flags): New typedef.
  (scm_c_bind_keyword_arguments): New prototype.

* doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add
  documentation.

* test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file.

* test-suite/standalone/Makefile.am: Add
  test-scm-c-bind-keyword-arguments test.
2013-04-06 18:09:45 -04:00
Mark H Weaver
369294866d Fix broken texinfo markup in (ice-9 iconv) docs.
* doc/ref/api-data.texi (Representing Strings as Bytes): Fix broken
  @deffn syntax.
2013-04-01 12:35:24 -04:00
Mark H Weaver
1e05106562 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/r6rs-ports.c
2013-04-01 05:42:31 -04:00
Mark H Weaver
3b80c35852 Fix typos in 'string-join' docs: 'string-infix' -> 'strict-infix'.
* doc/ref/api-data.texi (String Constructors): In definition of
  'string-join', change 'string-infix' -> 'strict-infix'.

* libguile/srfi-13.c (scm_string_join): In docstring, change
  'string-infix' -> 'strict-infix'.
2013-04-01 01:21:30 -04:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Andy Wingo
912f5f3445 fix doc build
* doc/ref/api-data.texi (Bitwise Operations): Don't use @-commands in
  @math.  Fixes doc build.
* doc/ref/api-macros.texi (Syntax Rules): Fix example result.
2013-03-15 19:22:18 +01:00
Mark H Weaver
e08a12b535 Add 'round-ash', a rounding arithmetic shift operator
* libguile/numbers.c (left_shift_exact_integer,
  floor_right_shift_exact_integer, round_right_shift_exact_integer): New
  static functions.

  (scm_round_ash): New procedure.

  (scm_ash): Reimplement in terms of 'left_shift_exact_integer' and
  'floor_right_shift_exact_integer'.

* libguile/numbers.h: Add prototype for scm_round_ash.  Rename the
  second argument of 'scm_ash' from 'cnt' to 'count'.

* test-suite/tests/numbers.test (round-ash, ash): Add new unified
  testing framework for 'ash' and 'round-ash'.  Previously, the tests
  for 'ash' were not very comprehensive; for example, they did not
  include a single test where the number to be shifted was a bignum.

* doc/ref/api-data.texi (Bitwise Operations): Add documentation for
  'round-ash'.  Improve documentation for `ash'.
2013-03-12 15:39:20 -04:00
Jason Earl
a4b4fbbdaa excise use of "iff" in the manual
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/compiler.texi:
* doc/ref/intro.texi:
* doc/ref/scheme-using.texi:
* doc/ref/sxml.texi:
* doc/ref/web.texi: Change uses of "iff" to "if, otherwise".  Fixes bug
  10302.
2013-03-10 22:29:18 +01:00
Mark H Weaver
444b26f739 Revert "random-state-from-platform: simplify pid conditional, and clarify docs."
This reverts commit 08904661a2.
2013-02-25 13:33:14 -05:00
Mark H Weaver
08904661a2 random-state-from-platform: simplify pid conditional, and clarify docs.
* libguile/random.c (random_state_of_last_resort): Simplify optional
  inclusion of PID in the random state.  Clarify in the comments that
  the PID is only included where scm_getpid is present.

* doc/ref/api-data.texi (Random): Clarify that
  'random-state-from-platform' includes the PID in the random state only
  if scm_getpid is present.
2013-02-24 19:57:00 -05:00
Andy Wingo
9b977c836b Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/array-handle.c
	libguile/deprecated.h
	libguile/inline.c
	libguile/inline.h
	module/ice-9/deprecated.scm
	module/language/tree-il/peval.scm
2013-02-18 17:59:38 +01:00
Andy Wingo
118ff892be deprecate generalized vectors in favor of arrays
* libguile/generalized-arrays.h:
* libguile/generalized-arrays.c (scm_c_array_length):
  (scm_array_length): New functions.

* module/ice-9/deprecated.scm:
* libguile/generalized-vectors.c:
* libguile/generalized-vectors.h:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_generalized_vector_p)
  (scm_generalized_vector_length, scm_generalized_vector_ref)
  (scm_generalized_vector_set_x, scm_generalized_vector_to_list):
  Deprecate.

* libguile/uniform.c (scm_uniform_vector_to_list): Use
  scm_array_to_list.

* module/ice-9/boot-9.scm (case): Arrays are generalized vectors.

* module/srfi/srfi-4/gnu.scm (define-any->vector): Use the array
  functions instead of the generalized-vector functions.

* test-suite/tests/arrays.test: Remove generalized-vector->list test;
  covered by array->list test.

* test-suite/tests/bitvectors.test:
* test-suite/tests/bytevectors.test:
* test-suite/tests/srfi-4.test: Adapt to test using array interfaces
  instead of generalized-vector interfaces.

* doc/ref/api-compound.texi: Remove generalized vector docs.
* doc/ref/api-data.texi:
* doc/ref/srfi-modules.texi: Adapt.
2013-02-18 16:57:15 +01:00
Mark H Weaver
7facc08a80 Add scm_from_ptrdiff_t and scm_to_ptrdiff_t.
* libguile/numbers.h (scm_from_ptrdiff_t, scm_to_ptrdiff_t):
  New macros (function aliases).

* doc/ref/api-data.texi: Add docs.
2013-02-02 04:13:37 -05:00
Andy Wingo
08467a7e61 add scm_from_port_string and friends
* doc/ref/api-data.texi (Conversion to/from C):
* libguile/strings.h:
* libguile/strings.c (scm_from_port_string, scm_from_port_stringn):
  (scm_to_port_string, scm_to_port_stringn): New functions.

* guile-readline/readline.c (internal_readline):
* libguile/strports.c (scm_strport_to_string):
* libguile/read.c (scm_read_number, scm_read_mixed_case_symbol):
  (scm_read_number_and_radix, scm_read_character): Use the new
  functions.
2013-01-15 16:32:17 +01:00
Andy Wingo
5ed4ea90a9 Change iconv procedures to take optional instead of keyword arg
* module/ice-9/iconv.scm (call-with-encoded-output-string):
  (string->bytevector, bytevector->string): Take an optional instead of
  a keyword argument.

* doc/ref/api-data.texi (Representing Strings as Bytes): Adapt docs to
  change, and fix a number of errors.  Thanks to Ludovic Courtès for the
  pointers.

* test-suite/tests/iconv.test ("wide non-ascii string"): Add a test for
  the 'substitute path.
2013-01-11 21:15:28 +01:00
Andy Wingo
f05bb8494c add bytevector->string and string->bytevector in new (ice-9 iconv) module
* module/Makefile.am:
* module/ice-9/iconv.scm: New module implementing procedures to encode
  and decode representations of strings as bytes.

* test-suite/Makefile.am:
* test-suite/tests/iconv.test: Add tests.

* doc/ref/api-data.texi: Add docs.
2013-01-11 15:15:37 +01:00
Daniel Hartwig
5f085775ab In string-split, add support for character sets and predicates.
* libguile/srfi-13.c (string-split): Add support for splitting on
  character sets and predicates, like string-index and others.
* test-suite/tests/strings.test (string-split): Add tests covering
  the new argument types.
* doc/ref/api-data.texi (string-split): Update.

Signed-off-by: Mark H Weaver <mhw@netris.org>
2012-10-12 08:15:08 -04:00
Mark H Weaver
07bc8e7c33 Remove documentation of internal static string comparison functions
* doc/ref/api-data.texi (String Comparison): Remove documentation for
  scm_i_string{,_ci}_{equal,less,leq,gr,geq}_p, which are not only
  internal functions but static, and thus unusable by external code.
2012-03-04 22:12:48 -05:00
Bake Timmons
5f6ffd6652 Improve consistency of definitions of C functions in manual.
* doc/ref/api-compound.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-foreign.texi
* doc/ref/api-io.texi
* doc/ref/posix.texi
* doc/ref/srfi-modules.texi: Add missing parentheses and commas to definitions
  of C functions.

* doc/ref/api-data.texi: Change from @deffn to @deftypefn for C function
  with arguments not of SCM type.
2012-02-04 00:10:14 +01:00
Bake Timmons
df0a100250 Make notation for Scheme repeated arguments more consistent in manual.
* doc/ref/api-compound.texi
* doc/ref/api-control.texi
* doc/ref/api-data.texi
* doc/ref/api-debug.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-macros.texi
* doc/ref/api-memory.texi
* doc/ref/api-modules.texi
* doc/ref/api-procedures.texi
* doc/ref/api-regex.texi
* doc/ref/api-scheduling.texi
* doc/ref/api-utility.texi
* doc/ref/goops.texi
* doc/ref/match.texi
* doc/ref/misc-modules.texi
* doc/ref/posix.texi
* doc/ref/r6rs.texi
* doc/ref/scheme-using.texi
* doc/ref/srfi-modules.texi
* doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more
  consistent in manual.
2012-02-04 00:10:13 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Mike Gran
bf8d845468 Update srfi-14 character sets to Unicode 6.1
* libguile/srfi-14.i.c (cs_lower_case_ranges, cs_lower_case)
  (cs_upper_case_ranges, cs_upper_case, cs_letter_ranges, cs_letter)
  (cs_digit_ranges, cs_digit, cs_letter_plus_digit_ranges, cs_letter_plus_digit)
  (cs_graphic_ranges, cs_graphic, cs_printing_ranges, cs_printing)
  (cs_punctuation_ranges, cs_punctuation, cs_symbol_ranges, cs_symbol)
  (cs_designated_ranges, cs_designated): modified
* doc/ref/api-data.texi: modified
2012-02-01 19:51:35 -08:00
Mark H Weaver
d47db067b6 Add random-state-from-platform' and scm_i_random_bytes_from_platform'
* libguile/random.c (scm_random_state_from_platform): New procedure.
  (scm_i_random_bytes_from_platform): New internal function.

* libguile/random.h (scm_random_state_from_platform,
  scm_i_random_bytes_from_platform): Add prototypes.

* doc/ref/api-data.texi (Random): Add documentation.
2012-01-21 03:22:57 -05:00
Andy Wingo
9accf3d98f add when, unless
* module/ice-9/boot-9.scm (when, unless): New forms.

* doc/ref/api-control.texi (Conditionals): Add docs.  Rename this
  node from "if cond case".

* doc/ref/r6rs.texi:
* doc/ref/scheme-ideas.texi:
* doc/ref/srfi-modules.texi: Update referrers.
2012-01-20 19:51:45 +01:00
Mark H Weaver
4dbd29a9b8 Fix docs of string mutators to do so on a mutable string
* doc/ref/api-data.texi (String Modification): Change
  (define y "abcdefg") => (define y (string-copy "abcdefg"))
  before mutating the string bound to y in the example code.
2012-01-04 13:43:47 -05:00
Ludovic Courtès
8071964943 Allow overlapping regions to be passed to `bytevector-copy!'.
Reported by Dmitry Chestnykh <dmitry@codingrobots.com>.
Fixes <http://debbugs.gnu.org/10070>.

* libguile/bytevectors.c (scm_bytevector_copy_x): Use `memmove', not
  `memcpy'.

* test-suite/tests/bytevectors.test ("2.2 General
  Operations")["bytevector-copy! overlapping"]: New test.

* doc/ref/api-data.texi (Bytevector Manipulation): Mention possible
  overlapping.
2011-11-20 01:10:58 +01:00
Mike Gran
022dda6901 New functions scm_is_exact and scm_is_inexact
* doc/ref/api-data.texi (Exact and Inexact Numbers): doc for scm_is_exact
  and scm_is_inexact
* libguile/numbers.c (scm_is_exact, scm_is_inexact): new functions
* libguile/numbers.h: declarations for scm_is_exact and scm_is_inexact
* test/suite/standalone/test-conversion.c (test_is_exact, test_is_inexact):
  new tests
2011-10-09 20:54:37 -07:00
Mark H Weaver
c3d8450c75 Clarify units of string length in decription of scm_from_stringn
* doc/ref/api-data.texi (Conversion to/from C): In description of
  scm_from_stringn, clarify that the length is specified in bytes.
2011-04-21 09:56:11 -04:00
Mark H Weaver
68a78738a4 Clarify the units of returned lengths in string conversion functions
* doc/ref/api-data.texi (Conversion to/from C): In descriptions of
  scm_to_stringn and scm_to_{latin1,utf8,utf32}, clarify that the
  returned length is in units of bytes or code points, not characters.
  Also change NULL to @code{NULL} in a few places.
2011-04-19 23:59:17 -04:00
Mark H Weaver
882c89636a 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.
2011-04-09 16:11:49 -04:00
Mark H Weaver
ce6066065d Doc fix: quotient/remainder/modulo do not require exact arguments
* doc/ref/api-data.texi (Arithmetic): `floor-remainder' is equivalent to
  the R5RS `modulo' when the arguments are integers.  Previously,
  equivalence was claimed only for exact integers.  Similarly for
  `truncate-quotient' and `truncate-remainder' compared with the R5RS
  `quotient' and `remainder'.
2011-04-06 13:00:34 -04:00
Andy Wingo
95f5e303bc scm_{to,from}_locale_string use current locale, not current ports
* libguile/strings.c (scm_to_locale_stringn, scm_from_locale_stringn):
  Use the encoding of the current locale, not of the current i/o ports.
  Also use the current conversion strategy.

* doc/ref/api-data.texi (Conversion to/from C): Update docs.
2011-03-17 18:29:08 +01:00
Mark H Weaver
c428e58681 Add scm_from_latin1_keyword and scm_from_utf8_keyword
* libguile/keywords.c (scm_from_latin1_keyword, scm_from_utf8_keyword):
  New functions appropriate for use when keyword name is a constant.

  (scm_from_locale_keyword, scm_from_locale_keywordn): Change formal
  parameter from `str' to `name'.

* libguile/keywords.h: Add prototypes for new functions.  Change formal
  parameter of scm_from_locale_keyword* from `str' to `name'.

* doc/ref/api-data.texi: Document new functions.  Remind users that
  scm_from_locale_keyword should not be used when the name is a C string
  constant.  Change formal parameter from `str' to `name'.
2011-03-09 01:14:43 -05:00
Mark H Weaver
ce3ce21c62 Improve docs of string and symbol conversions from C strings
* doc/ref/api-data.texi (Conversion to/from C): Document
  scm_from_latin1_string, scm_from_utf8_string, and
  scm_from_utf32_string.  Remind readers that these functions should be
  used to convert C string constants, and that scm_from_locale_string is
  _not_ appropriate for that purpose.

  (Symbol Primitives): Document scm_from_latin1_symbol and
  scm_from_utf8_symbol.  Remind readers that these functions should be
  used when the specified names are C string constants, and that
  scm_from_locale_symbol is _not_ appropriate for that purpose.
2011-03-08 18:24:54 -05:00
Mark H Weaver
a6b087be1b Fix minor errors in docs of division operators
* doc/ref/api-data.texi (Arithmetic): The R5RS `quotient', `remainder',
  and `modulo' operators are exact-integer-only operators.  `modulo' is
  equivalent to `floor-remainder', not `floor-quotient'.
2011-02-15 09:20:17 +01:00
Mark H Weaver
8f9da3406b Add four new sets of fast quotient and remainder operators
* libguile/numbers.c (scm_floor_divide, scm_floor_quotient,
  scm_floor_remainder, scm_ceiling_divide, scm_ceiling_quotient,
  scm_ceiling_remainder, scm_truncate_divide, scm_truncate_quotient,
  scm_truncate_remainder, scm_round_divide, scm_round_quotient,
  scm_round_remainder): New extensible procedures `floor/',
  `floor-quotient', `floor-remainder', `ceiling/', `ceiling-quotient',
  `ceiling-remainder', `truncate/', `truncate-quotient',
  `truncate-remainder', `round/', `round-quotient', and
  `round-remainder'.

* libguile/numbers.h: Add function prototypes.

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

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

* NEWS: Add NEWS entry.
2011-02-14 20:30:53 +01:00