Add some (commented) tests for 3.79
This needs working out how to load modules from within modules to work properly.
This commit is contained in:
parent
663b98cf17
commit
9bc3adade4
12
streams.rkt
12
streams.rkt
|
@ -780,6 +780,18 @@
|
|||
(scale-stream y b))))
|
||||
y)))
|
||||
|
||||
;; (module+ test
|
||||
;; ;; Test: a=0, b=-1, y0=1, dy0=0: d^2/dx(cos(x)) = -cos(x). Evaluate at pi -> -1
|
||||
;; ;; a=0, b=-1, y0=0, dy0=1: d^2/dx(sin(x)) = -sin(x). Evaluate at pi -> 0
|
||||
|
||||
;; (check (close-to (stream-ref (solve-2nd 0 -1 (/ 3.1415 1000) 1 0) 1000)
|
||||
;; -1
|
||||
;; 0.01))
|
||||
|
||||
;; (check (close-to (stream-ref (solve-2nd 0 -1 (/ 3.1415 1000) 0 1) 1000)
|
||||
;; 0
|
||||
;; 0.01)))
|
||||
|
||||
(module+ 3-79
|
||||
(#%require racket/local)
|
||||
(define (solve-2nd f dt y0 dy0)
|
||||
|
|
Loading…
Reference in New Issue