mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
Fixing (scheme char) imports after earlier refactoring; adding definitions for finite? and nan?.
This commit is contained in:
parent
3e21d00b91
commit
8094d585b8
3 changed files with 9 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
(define-library (scheme char)
|
(define-library (scheme char)
|
||||||
(import (scheme))
|
(import (scheme) (only (scheme base) string-map))
|
||||||
(export
|
(export
|
||||||
char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>?
|
char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>?
|
||||||
char-downcase char-foldcase char-lower-case? char-numeric?
|
char-downcase char-foldcase char-lower-case? char-numeric?
|
||||||
|
|
6
lib/scheme/inexact.scm
Normal file
6
lib/scheme/inexact.scm
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
(define (finite? x)
|
||||||
|
(and (real? x) (not (nan? x)) (not (= x +inf.0)) (not (= x -inf.0))))
|
||||||
|
|
||||||
|
(define (nan? x)
|
||||||
|
(and (real? x) (not (= x x))))
|
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
(define-library (scheme inexact)
|
(define-library (scheme inexact)
|
||||||
(import (scheme))
|
(import (scheme))
|
||||||
(export acos asin atan cos exp finite? log nan? sin sqrt tan))
|
(export acos asin atan cos exp finite? log nan? sin sqrt tan)
|
||||||
|
(include "inexact.scm"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue