mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
remove superfluous + when printing complex numbers with negative ratio imaginary parts
This commit is contained in:
parent
05ca40fa51
commit
8247e13baf
1 changed files with 8 additions and 5 deletions
|
@ -1046,11 +1046,14 @@ SEXP_API sexp sexp_make_unsigned_integer(sexp ctx, sexp_luint_t x);
|
|||
#define sexp_negativep(x) (sexp_exact_negativep(x) || \
|
||||
(sexp_flonump(x) && sexp_flonum_value(x) < 0))
|
||||
#define sexp_positivep(x) (!(sexp_negativep(x)))
|
||||
#define sexp_pedantic_negativep(x) (sexp_exact_negativep(x) || \
|
||||
(sexp_flonump(x) && \
|
||||
((sexp_flonum_value(x) < 0) || \
|
||||
(sexp_flonum_value(x) == 0 && \
|
||||
1.0 / sexp_flonum_value(x) < 0))))
|
||||
#define sexp_pedantic_negativep(x) ( \
|
||||
sexp_exact_negativep(x) || \
|
||||
(sexp_ratiop(x) && \
|
||||
sexp_exact_negativep(sexp_ratio_numerator(x))) || \
|
||||
(sexp_flonump(x) && \
|
||||
((sexp_flonum_value(x) < 0) || \
|
||||
(sexp_flonum_value(x) == 0 && \
|
||||
1.0 / sexp_flonum_value(x) < 0))))
|
||||
|
||||
#if SEXP_USE_BIGNUMS
|
||||
#define sexp_oddp(x) (sexp_fixnump(x) ? sexp_unbox_fixnum(x) & 1 : \
|
||||
|
|
Loading…
Add table
Reference in a new issue