SRFI-144: accept zero arguments for flmax/flmin

SRFI-144 requires that (flmin) returns +inf.0 and that
(flmax) returns -inf.0, so these procedures can't really
be aliases to the Chibi implementation of R7RS max and min.
This commit is contained in:
Jeronimo Pellegrini 2022-05-14 08:14:08 -03:00
parent 42332bb04f
commit 1ecf7f9c8a

View file

@ -17,8 +17,8 @@
(define fl- -)
(define fl* *)
(define fl/ /)
(define flmax max)
(define flmin min)
(define (flmax . args) (if (null? args) -inf.0 (apply max args)))
(define (flmin . args) (if (null? args) +inf.0 (apply min args)))
(define (flabsdiff x y) (abs (- x y)))
(define flnumerator numerator)
(define fldenominator denominator)