mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
support infinite real with exact zero imaginary literals (issue #474)
This commit is contained in:
parent
22f87f67ab
commit
39043bc47c
1 changed files with 2 additions and 0 deletions
2
sexp.c
2
sexp.c
|
@ -3253,6 +3253,8 @@ sexp sexp_read_raw (sexp ctx, sexp in, sexp *shares) {
|
|||
res = sexp_string_to_number(ctx, res, SEXP_TEN);
|
||||
if (sexp_complexp(res) && (sexp_complex_real(res) == SEXP_ZERO))
|
||||
sexp_complex_real(res) = tmp;
|
||||
else if (res == SEXP_ZERO)
|
||||
res = tmp;
|
||||
else if (!sexp_exceptionp(res))
|
||||
res = sexp_read_error(ctx, "invalid complex infinity", res, in);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue