mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 06:39:17 +02:00
fixes from doug currie when complex support not compiled in
This commit is contained in:
parent
5f7a38da19
commit
5d92523bf4
1 changed files with 4 additions and 2 deletions
|
@ -894,7 +894,9 @@
|
|||
(cond-expand
|
||||
(complex
|
||||
(define (exact-complex? x)
|
||||
(and (%complex? x) (exact? (complex-real x)) (exact? (complex-imag x))))))
|
||||
(and (%complex? x) (exact? (complex-real x)) (exact? (complex-imag x)))))
|
||||
(else
|
||||
(define (exact-complex? x) #f)))
|
||||
|
||||
(cond-expand
|
||||
(ratios
|
||||
|
@ -993,7 +995,7 @@
|
|||
(* (imag-part z) (imag-part z)))))
|
||||
(define (angle z) (atan (imag-part z) (real-part z)))
|
||||
(define (make-rectangular x y)
|
||||
(+ x (* z 0+1i)))
|
||||
(+ x (* z (sqrt -1))))
|
||||
(define (make-polar r phi)
|
||||
(make-rectangular (* r (cos phi)) (* r (sin phi)))))
|
||||
(else
|
||||
|
|
Loading…
Add table
Reference in a new issue