1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-08 22:50:27 +02:00
guile/test-suite/tests
Mark H Weaver 8b56bcec44 Optimize truncate, round, floor, and ceiling
* libguile/numbers.c (scm_c_truncate): Use ceil (x) instead of
  -floor (-x).

  (scm_truncate_number): Implement directly instead of by checking the
  sign and using scm_floor or scm_ceiling.  Use scm_truncate_quotient
  for fractions.  Make extensible, so that new number types implemented
  in GOOPS will be able to do the job more efficiently, since it is
  often easier to implement truncate than floor or ceiling.

  (scm_round_number): Optimize fractions case by using
  scm_round_quotient.  Make extensible, so that new number types
  implemented in GOOPS will be able to do the job efficiently.

  (scm_floor, scm_ceiling): Optimize fractions case by using
  scm_floor_quotient and scm_ceiling_quotient, respectively.

* test-suite/tests/numbers.test: Add test cases.
2011-02-14 20:31:14 +01:00
..
00-initial-env.test Add optimized tagged integer addition/subtractions for x86_64. 2010-11-19 13:34:43 +01:00
alist.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
and-let-star.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
arbiters.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
arrays.test add docs and tests for array->list 2010-04-07 21:04:37 +02:00
asm-to-bytecode.test rename (rnrs bytevector) to (rnrs bytevectors) 2010-06-01 13:26:11 +02:00
bit-operations.test fix bug in ash opcode 2010-03-31 22:29:29 +02:00
bitvectors.test bitvector work 2010-08-29 20:48:32 -07:00
brainfuck.test fix brainfuck for new tree-il, and add tests 2009-10-23 15:10:25 +02:00
bytevectors.test Move with-test-prefix/c&e' to (test-suite lib)'. 2010-11-19 13:34:43 +01:00
c-api.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
chars.test Re-introduce pretty-printing of combining characters. 2010-09-15 01:02:54 +02:00
common-list.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
compiler.test add call-with-vm; remove thread-vm bits; remove vm-apply; engines settable. 2010-09-27 21:12:29 +02:00
continuations.test remove debug frames 2009-12-03 11:03:39 +01:00
control.test add call-with-vm; remove thread-vm bits; remove vm-apply; engines settable. 2010-09-27 21:12:29 +02:00
coverage.test Fix coverage analysis of procedures called from C. 2010-09-24 15:39:47 +02:00
curried-definitions.test fix curried definitions for value defines 2010-04-08 21:01:52 +02:00
ecmascript.test Add ECMAScript parser tests. 2011-01-26 23:47:31 +01:00
elisp-compiler.test lexical function binding for elisp 2010-12-07 13:21:03 +01:00
elisp-reader.test use correct names for quasiquotation operators 2010-12-07 13:21:02 +01:00
elisp.test elisp.test cleanups 2010-04-09 22:33:46 +02:00
encoding-escapes.test Change `scm_encoding_error' to pass the port and faulty character. 2011-02-02 18:06:29 +01:00
encoding-iso88591.test Re-introduce pretty-printing of combining characters. 2010-09-15 01:02:54 +02:00
encoding-iso88597.test Use encoding-error' instead of misc-error' for string encoding errors. 2010-01-07 11:10:35 +01:00
encoding-utf8.test Re-introduce pretty-printing of combining characters. 2010-09-15 01:02:54 +02:00
eval.test add call-with-vm; remove thread-vm bits; remove vm-apply; engines settable. 2010-09-27 21:12:29 +02:00
exceptions.test deprecate lazy-catch 2010-02-26 11:56:02 +01:00
filesys.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
fluids.test fix unbound fluid tests 2010-12-17 13:53:29 +01:00
foreign.test Improve type checking when invoking foreign functions. 2011-02-09 00:08:14 +01:00
format.test Make `(format #f ...)' always Unicode-capable. 2011-02-08 23:14:00 +01:00
fractions.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
ftw.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
future.test futures: Support multiple-value returns. 2010-12-16 23:45:24 +01:00
gc.test Tweak the "unused modules are removed" test. 2009-12-11 23:27:47 +01:00
getopt-long.test getopt-long: arg parsing errors cause print and exit, not backtrace 2011-02-10 12:17:23 +01:00
goops.test interpreted closures cons less. 2009-12-13 16:18:39 +01:00
guardians.test Merge branch 'master' into boehm-demers-weiser-gc 2009-08-18 00:06:45 +02:00
hash.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
hooks.test Enclose hooks tests in their own module. 2010-01-07 11:10:36 +01:00
i18n.test Fix i18n tests when no French locale is available. 2010-08-16 12:27:14 +02:00
import.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
interp.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
keywords.test Fix "coding:" cookies in the test suite. 2010-03-02 23:36:29 +01:00
list.test Add tests for memq' and memv'. 2011-02-07 22:12:10 +01:00
load.test change remaining %nil -> #nil 2010-04-09 21:06:29 +02:00
match.test Fix pattern variable extraction in match' with ..1'. 2010-09-27 23:52:10 +02:00
modules.test Have `the-scm-module' be its own public interface (bug #30623). 2011-02-13 15:36:52 +01:00
multilingual.nottest Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
net-db.test Change getaddrinfo' test to handle the GNU-specific EAI_NODATA'. 2011-01-05 22:17:26 +01:00
numbers.test Optimize truncate, round, floor, and ceiling 2011-02-14 20:31:14 +01:00
optargs.test fix self-tail-calls for lexical procs with optional, rest, or kwargs 2010-12-10 16:07:58 +01:00
options.test fix up options.test 2010-09-25 12:12:45 +02:00
pairs.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
poe.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
popen-child.scm Fix hanging of popen.test 2010-07-01 22:16:54 +01:00
popen.test autocompile -> auto-compile 2011-02-13 15:06:11 +01:00
ports.test Simplify `scm_i_set_port_encoding_x'. 2011-02-10 23:04:43 +01:00
posix.test Add total-processor-count' and current-processor-count'. 2010-12-07 23:13:20 +01:00
print.test Improve handling of read macros in `pretty-print'. 2010-11-05 01:39:26 +01:00
procprop.test use procedure-minimum-arity in tests 2010-04-19 12:05:27 +02:00
procs.test Add compose', negate', and `const'. 2010-12-16 23:45:23 +01:00
q.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
r4rs.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
r5rs_pitfall.test Remove deprecation warnings from the build 2009-09-17 01:18:14 +01:00
r6rs-arithmetic-bitwise.test Implementation and test cases for the R6RS (rnrs arithmetic bitwise) 2010-05-20 21:18:02 -04:00
r6rs-arithmetic-fixnums.test Add two new sets of fast quotient and remainder operators 2011-01-30 23:00:38 +01:00
r6rs-arithmetic-flonums.test Add two new sets of fast quotient and remainder operators 2011-01-30 23:00:38 +01:00
r6rs-base.test Implement R6RS real-valued?', rational-valued?', `integer-valued?' 2011-01-30 13:08:53 +01:00
r6rs-conditions.test Some tweaks to the R6RS support 2010-11-25 23:04:12 +01:00
r6rs-control.test Implementation and test cases for the R6RS (rnrs control) library. 2010-05-20 21:18:02 -04:00
r6rs-enums.test Enumeration set universe comparisons should be done with `equal?' 2010-11-21 15:35:44 -05:00
r6rs-eval.test Fix typo in license comment. 2010-05-20 21:18:04 -04:00
r6rs-exceptions.test Add `guard' form and test cases to R6RS (rnrs exceptions) library. 2010-05-20 21:18:03 -04:00
r6rs-files.test Implementation and test cases for R6RS (rnrs files) library. 2010-05-20 21:18:03 -04:00
r6rs-hashtables.test Fix argument passing for external hash functions in `(rnrs hashtables)'. 2010-07-14 01:16:19 -04:00
r6rs-lists.test Explicit definitions for memp' and assp' in `(rnrs list)'; the predicate 2010-08-08 20:23:14 -04:00
r6rs-ports.test R6RS: Have put-char', put-string', etc. raise an `&i/o-encoding-error'. 2011-02-02 18:06:29 +01:00
r6rs-records-inspection.test Implementation for the R6RS (rnrs hashtables) library; 2010-05-20 21:18:02 -04:00
r6rs-records-procedural.test Fix test suite title in comment 2010-05-20 21:18:03 -04:00
r6rs-records-syntactic.test scheme-mode in syntactic records test 2010-06-19 15:40:47 +02:00
r6rs-unicode.test Implementation and test cases for the R6RS (rnrs unicode) library. 2010-05-20 21:18:03 -04:00
ramap.test implement transcendental sin, cos etc in c; deprecate $sin, $cos, etc 2009-12-03 15:27:35 +01:00
rdelim.test Add `read-delimited' tests. 2011-02-10 23:04:38 +01:00
reader.test implement r6rs hungry escaped EOL 2011-01-21 09:24:32 +01:00
receive.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
records.test make-record-type slight refactor 2010-04-19 19:33:57 +02:00
regexp.test Fix `regexp.test' when the "en_US.utf8" locale isn't available. 2010-11-24 23:38:01 +01:00
rnrs-libraries.test r6rs `import' accepts multiple clauses 2010-06-09 08:55:02 +02:00
rnrs-test-a.scm add rnrs libraries test suite 2010-05-03 22:11:15 +02:00
session.test Fix for `submodules' in (ice-9 session) (closes #30062) 2010-09-02 21:47:04 -07:00
signals.test Add define-module to signals.test 2009-10-01 21:56:49 +01:00
socket.test Add a test for send' and recv!'. 2011-01-29 21:36:59 +01:00
sort.test gut trampolines 2009-12-01 21:00:23 +01:00
srcprop.test no special treatment for memoized code in srcprop.c 2009-12-01 21:00:26 +01:00
srfi-1.test SRFI-1: Make `fold-right' tail-recursive. 2010-10-08 15:25:56 +02:00
srfi-4.test Fix off-by-one error when initializing vectors in `make-srfi-4-vector'. 2010-03-02 23:16:26 +01:00
srfi-6.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-9.test Fix SRFI-9 for records without fields 2010-06-19 14:52:56 +02:00
srfi-10.test add quasisyntax 2009-11-14 17:25:12 +01:00
srfi-11.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-13.test fix srfi-13 test argument orders 2011-02-02 21:55:13 +01:00
srfi-14.test copyright dates 2010-04-03 06:46:23 -07:00
srfi-17.test adapt tests to new syntax-error form 2010-11-18 11:04:15 +01:00
srfi-18.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-19.test Have srfi-19.test' use the non-deprecated format' style. 2011-01-29 21:46:44 +01:00
srfi-26.test * tests/srfi-26.test: New. 2004-01-21 00:45:48 +00:00
srfi-27.test Add implementation of SRFI 27 2010-09-27 22:15:51 +02:00
srfi-31.test fix srfi-31 check after macroexpand rename 2010-03-19 17:05:46 +01:00
srfi-34.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-35.test Fix "coding:" cookies in the test suite. 2010-03-02 23:36:29 +01:00
srfi-37.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-38.test Add implementation of SRFI 38 2010-11-03 00:19:54 +01:00
srfi-39.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-42.test Add implementation of SRFI 42 2010-10-03 12:09:50 +02:00
srfi-45.test Add implementation of SRFI 45 2010-10-03 21:54:22 +02:00
srfi-60.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-67.test Add implementation of SRFI-67 2010-10-03 12:14:21 +02:00
srfi-69.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
srfi-88.test Fix "coding:" cookies in the test suite. 2010-03-02 23:36:29 +01:00
srfi-98.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
statprof.test statprof test traps fix; re-enable accurate call counting test 2010-09-25 12:09:13 +02:00
streams.test Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
strings.test Fix type-checking in the optimized path of `string=?'. 2010-07-13 00:08:09 +02:00
structs.test Optimize struct initialization and accessors for the common case. 2010-01-23 16:21:13 +01:00
sxml-match-tests.ss sxml-match: Handle multiple-value returns. 2010-05-26 23:41:23 +02:00
sxml.fold.test Remove `fold' from (sxml fold). 2010-04-09 00:32:14 +02:00
sxml.match.test Add (sxml match). 2010-05-25 23:31:36 +02:00
sxml.simple.test Have sxml->xml' handle *TOP*' nodes (bug #29260). 2010-05-11 23:46:05 +02:00
sxml.ssax.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
sxml.transform.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
sxml.xpath.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
symbols.test Remove the distinction between inline/outline storage for stringbufs. 2009-09-01 02:02:43 +02:00
syncase.test fix (set! MACRO exp) hygiene 2010-07-09 17:05:02 +02:00
syntax.test fix quasiquote test 2011-02-08 22:43:43 +01:00
texinfo.docbook.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
texinfo.serialize.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
texinfo.string-utils.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
texinfo.test update licenses on tests imported from guile-lib 2010-04-07 21:37:50 +02:00
threads.test Implement `(ice-9 threads)' high-level constructs in terms of futures. 2010-12-16 23:45:24 +01:00
time.test Modify socket and time functions for wide strings 2009-08-23 09:29:45 -07:00
tree-il.test Add `*current-warning-prefix*'. 2011-02-13 19:13:36 +01:00
vectors.test add vector-move test cases 2011-02-14 20:21:04 +01:00
version.test Relax the `(version)' test. 2010-05-30 22:39:23 +02:00
vlist.test Add vhash-fold*' in (ice-9 vlist)'. 2010-07-21 00:28:58 +02:00
weaks.test Allow arbitrary code in ASSOC procedures for weak hash tables (bug #29616). 2010-10-11 15:38:06 +02:00
web-http.test parse credentials and challenges 2011-01-10 09:31:29 -08:00
web-request.test (web response) and (web request): bodies are bytevectors 2011-01-10 22:44:36 -08:00
web-response.test (web response) and (web request): bodies are bytevectors 2011-01-10 22:44:36 -08:00
web-uri.test rename string->uri and uri->string. 2011-01-07 09:18:36 -08:00