Commit graph

2976 commits

Author SHA1 Message Date
Hamayama
fdc1f86f09 Fix syntax-rules on ellipsis escape templates 2018-07-03 12:41:00 +09:00
Alex Shinn
0efa071672 use PRId64/32 where available for printing fixnums (issue #479) 2018-06-29 22:44:16 +08:00
Alex Shinn
f5a228ee9e fixing bug in flushed output on custom ports 2018-06-23 19:21:38 +08:00
Alex Shinn
f16e889e04
Merge pull request #478 from okuoku/win32-cmake
Activate Win64 platform with MSVC
2018-06-21 22:36:56 +08:00
okuoku
961131d5e1 doc: Update README-win32.md to reflect recent changes 2018-06-20 21:22:36 +09:00
okuoku
dcf23aaa02 AppVeyor: Add MSVC x64 configuration to CI 2018-06-20 21:22:36 +09:00
okuoku
432b763555 cmake: Use SEXP_64BIT on Win64
Do not override SEXP_64BIT on Win64 as now we have custom-long-long for
it.
2018-06-20 21:16:40 +09:00
Alex Shinn
f9bd4f9c0e
Merge pull request #477 from tramboi/expt_fix
Expt fix
2018-06-20 18:46:11 +08:00
Alex Shinn
12d7c1638e
Merge pull request #475 from tramboi/master
More portable bignums
2018-06-20 18:45:38 +08:00
Bertrand Augereau
952d7c806b More portable bignums that don't have to rely on gcc 128bit arithmetics extension
SEXP_USE_CUSTOM_LONG_LONGS currently needs SEXP_64_BIT
2018-06-19 04:46:05 +02:00
Bertrand Augereau
ce9c60c1e8 Fix (expt 3 -1) when SEXP_USE_BIGNUMS 2018-06-16 09:41:09 +02:00
Alex Shinn
5f428d1299 limit waiting in thread scheduler to 10ms 2018-06-13 22:33:39 +08:00
Alex Shinn
e8c10ce259
Merge pull request #476 from tramboi/expt_neg
(expt bignum -k) was equal to (expt bignum k)
2018-06-10 22:39:07 +08:00
Bertrand Augereau
d88dfeb172 Fix (expt bignum -k) 2018-06-10 03:21:00 +02:00
Bertrand Augereau
4d8933119f Test that (expt bignum -k) is correct 2018-06-10 03:20:35 +02:00
Alex Shinn
39043bc47c support infinite real with exact zero imaginary literals (issue #474) 2018-06-09 18:02:50 +08:00
Alex Shinn
22f87f67ab char names should obey case-(in)sensitivity (issue #471) 2018-05-12 19:43:02 +08:00
Alex Shinn
bfcab41056 add cc command line to ffi debug output 2018-05-12 07:39:26 +08:00
Alex Shinn
10ed000e1b
Merge pull request #469 from jacius/invalid_apply
Raise error if apply is called with invalid args.
2018-04-15 22:02:14 +09:00
John Croisant
42dd447a06 Raise error if apply is called with invalid args.
* If called with only the procedure, but no args list.
* If called with a final arg that is not a proper list.
2018-04-14 20:49:03 -05:00
Alex Shinn
d8e2e4aa54 add support for user-defined error types and functions in ffi, address-of, frameworks 2018-04-14 23:22:02 +09:00
Alex Shinn
10759e8bdb moving some scripts to tools/ 2018-04-05 22:21:33 +09:00
Alex Shinn
72de3ba12f exit codes should be exact (issue #467) 2018-04-05 22:11:05 +09:00
Alex Shinn
278911e93c
Merge pull request #466 from okuoku/fix-pull-465
test: Do not create file under /tmp in show-test
2018-04-04 23:35:11 +09:00
okuoku
583c45a6c1 test: Do not create file under /tmp in show-test
Do not create test file under /tmp as it might break
concurrent builds. Creating file on the current directory should
suffice.
2018-04-04 05:27:03 +09:00
Alex Shinn
656efad587 updating note about thread status in TODO 2018-04-03 07:53:36 +09:00
Alex Shinn
ecbaa9939a require proof of the presence of synclos before stripping them with quote (issue #464) 2018-04-01 21:38:21 +09:00
Alex Shinn
f67f63d570 fixing number->string for numbers within an ulp of round numbers 2018-04-01 21:01:58 +09:00
Alex Shinn
060cfd550e
Merge pull request #465 from jimrees/master
changes from jim rees
2018-04-01 15:32:32 +09:00
Alex Shinn
502a011b18 Merge branch 'master' of https://github.com/ashinn/chibi-scheme 2018-04-01 10:47:02 +09:00
Alex Shinn
757b8969dd
Merge pull request #463 from katterjohn/master
Avoid placing duplicate feature identifiers in the features list
2018-04-01 10:46:51 +09:00
Kris Katterjohn
5e80cb2c2b In my last commit, make the feature variable a gc variable 2018-03-31 20:23:00 -05:00
Kris Katterjohn
dc80bf4f04 Avoid placing duplicate feature identifiers in the (features) list
In my case "bsd" was present twice on my *BSD boxes
2018-03-31 14:19:18 -05:00
Alex Shinn
731c544872
Merge pull request #462 from katterjohn/master
Check for valid "rest" parameters in parameter lists
2018-03-29 18:45:23 +09:00
Kris Katterjohn
439e35da61 Check for valid "rest" parameters in parameter lists
Checks for invalid parameter names and duplicate parameters were
being performed on parameter lists, but these checks were not
considering any rest parameters.  This means that

  ((lambda (x . x) x) 'foo 'bar)   =>  foo
  ((lambda (x . 0) x) 'foo 'bar)   =>  foo
  ((lambda (x . #t) x) 'foo 'bar)  =>  foo
  ((lambda 0 'foo))                =>  foo
  ((lambda #t 'foo))               =>  foo

and so on.  Now these all produce errors.
2018-03-28 21:11:33 -05:00
Jim Rees
9b72412e4e Added additional show-tests which demonstrate recent bugs & fixes. 2018-03-27 14:47:14 -04:00
Jim Rees
b3100857fd Fixed escaped to support the documented double-quoting functionality
when esc-char is #f.
2018-03-26 06:44:37 -04:00
Jim Rees
88e8d89460 Fixed integer-log-base to use exact arithmetic so rounding doesn't cause
a wrong result to things like (numeric (- (* 36 36 36) 1) 36).

Fixed a bug in numeric that caused comma-sep and dec-sep to get
initialized wrongly.

Fixed maybe-trim-zeros to leave behind at least a ".0" on
inexact numbers that otherwise would have been output without
the decimal point.  This is for consistency with number->string
which is used when the radix is 10.

In gen-general, fixed a bug in the digit-generating loop for the
whole part of the number.  Previously, an integer that should
have looked like 5003 would be emitted as 5300.

Switched the order of application of maybe-round and
maybe-trim-zeros so that a number that should round to
.0000000000000001 doesn't get emitted as 0.1.

In gen-positive-real, fixed the ratio case to not call
number->string with a radix that might not be in {2,8,10,16}.

Also in gen-positive-real, fixed the call to number->string to
include the radix which was missing previously.

Fixed wrap-sign to correctly handle the case of -0.0.

In numeric/si, always emit the supplied separator even if the
number is too small for an SI-suffix to be emitted.  The
examples in the SRFI document depend on this.
2018-03-23 12:22:03 -04:00
Jim Rees
17eb19e43d Changed sexp_double_to_bignum to extract "digits" in base-16 rather
than base 10 so no round-off errors occur at each step.  This is
assuming FLT_RADIX is 2,4,8 or 16.
2018-03-23 10:50:15 -04:00
Jim Rees
b25e46b11b Introduced a second version of sexp_double_to_ratio, named
sexp_double_to_ratio_2, which converts without introducing
round-off errors the way sexp_double_to_ratio does when it
multiplies by 10.

Changed sexp_inexact_to_exact to use this new function when
a non-zero fractional part of the input exists.
2018-03-22 22:19:39 -04:00
Jim Rees
406aacf4dd try-fitted2/output* calls output on the argument string if it's
determined the string will not exceed the column width.  But
output is the caller environment's output state variable.  A
better choice is output-default.

In two places (length+ form) is replaced with (or (length+ form) +inf.0)
so that arithmetic can be performed on the result.

To support cyclic structures in pretty-simply (wrapped with
trimmed/lazy), the call-with-output form in pp-with-indent needs to be
wrapped with an appropriate trimmed/lazy.

In pp-pair, call (pp (car ls)) instead of (pretty (car ls)).

In pretty-simply, don't use call-with-output, that prevents
(trimmed/lazy n (pretty-simply ...)) from working at all on cyclic
input.
2018-03-22 11:06:55 -04:00
Jim Rees
b947e4ef47 Fixed trivial bug in padded/both where the "odd space" was being emitted
on the left rather than the right as specified.

Fixed trivial bug in padded/left where a string longer than the provided
width would result in a call to make-string with a negative length.

Fixed trivial bug in trimmed/lazy around an fn-binding for the output
state variable.
2018-03-22 10:41:52 -04:00
Jim Rees
ece2d470c3 Fixed from-file so that it produces more than just one line of output. 2018-03-22 09:50:34 -04:00
Alex Shinn
098d50d4e4 Merge branch 'master' of https://github.com/ashinn/chibi-scheme 2018-03-17 17:01:42 +09:00
Alex Shinn
933aeb5654 tests which expect an inexact value can accept an equivalent exact value 2018-03-17 16:50:41 +09:00
Alex Shinn
d0b63109e8
Merge pull request #461 from jacius/remainder_inf
Regression tests for remainder with infinity
2018-03-16 22:40:32 +09:00
John Croisant
fe85ccc94a Add regression tests for remainder with infinity. 2018-03-15 21:48:19 -05:00
John Croisant
3c41f9d3e2 Add "test-division" Makefile target.
Runs tests/division-tests.scm. The "test-all" target now also runs
test-division.
2018-03-15 21:43:21 -05:00
John Croisant
c5345a5b48 Fix errors in tests/division-tests.scm.
Import (scheme base) to get the basic division procedures.

The "centered" procedures were renamed to "balanced" in commit
975dc690a1.

Also cleaned up some trailing whitespace.
2018-03-15 21:37:08 -05:00
Alex Shinn
d167f90802
Merge pull request #460 from jacius/remainder_inf
Raise type error if remainder called with infinity.
2018-03-15 21:46:25 +09:00