diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-05-07 19:05:38 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-05-07 19:05:38 +0200 |
| commit | ef8fd9c3e94f37ab4cdd73601cef9d35724ff79a (patch) | |
| tree | 4389744f902eeb385e9d3f080fbd6e3ef7a5cd48 /coding-exercises/2/83/install.rkt | |
| parent | f5bdf1084cd72ebb6556aa4df66f4191abc2b680 (diff) | |
fix projecting with rationals?
Diffstat (limited to 'coding-exercises/2/83/install.rkt')
| -rw-r--r-- | coding-exercises/2/83/install.rkt | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/coding-exercises/2/83/install.rkt b/coding-exercises/2/83/install.rkt index 5a4f72a..fcaff0b 100644 --- a/coding-exercises/2/83/install.rkt +++ b/coding-exercises/2/83/install.rkt @@ -11,14 +11,14 @@ make-complex-rect test-complex-rect make-complex-polar - test-complex-polar + ;test-complex-polar term dense-termlist sparse-termlist make-polynomial - test-poly1 - test-poly2 - test-poly3 + ; test-poly1 + ; test-poly2 + ; test-poly3 =zero? equ? add @@ -82,8 +82,8 @@ ((get 'make-from-mag-ang 'complex) x y)) (define test-complex (make-complex 1 2)) (define test-complex-rect (make-complex-rect 1 2)) -(define test-complex-polar (make-complex-polar (apply-fn 'magnitude test-complex) - (apply-fn 'angle test-complex))) +(display (apply-fn 'magnitude test-complex)) +;; (define test-complex-polar (make-complex-polar (apply-fn 'magnitude test-complex) (apply-fn 'angle test-complex))) ;; polynomial (define (term order coeff) @@ -94,16 +94,16 @@ ((get 'make-from-terms 'dense-termlist) terms)) (define (make-polynomial var terms) ((get 'make 'polynomial) var terms)) -(define test-poly1 (make-polynomial 'x (sparse-termlist - (term 1 test-integer)))) -(define test-poly2 (make-polynomial 'x (sparse-termlist - (term 100 test-complex) - (term 2 test-real) - (term 1 test-rat) - (term 0 test-integer)))) -(define test-poly3 (make-polynomial 'x (sparse-termlist - (term 50 test-rat) - (term 0 2)))) +; (define test-poly1 (make-polynomial 'x (sparse-termlist +; (term 1 test-integer))) +; (define test-poly2 (make-polynomial 'x (sparse-termlist +; (term 100 test-complex) +; (term 2 test-real) +; (term 1 test-rat) +; (term 0 test-integer)))) +; (define test-poly3 (make-polynomial 'x (sparse-termlist +; (term 50 test-rat) +; (term 0 2)))) ;; generic methods (define (equ? a1 a2) |
