close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

source: branches/f4grobner/test1.lisp@ 4099

Last change on this file since 4099 was 4088, checked in by Marek Rychlik, 8 years ago
File size: 969 bytes
RevLine 
[4073]1(in-package :division)
2
[4083]3
[4084]4#+nil
[4073]5(let ((f (string->poly "x^2" '(x y)))
6 ;;(y-sq (string->poly "y^2" '(x y)))
7 (fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
8 ;;(quotients (cdr (string->poly "[x-y,0]" '(x y))))
9 )
10 (multiple-value-bind (f c division-count)
[4083]11 (step (normal-form f fl))
[4073]12 (format t "Quotient: ~S~%" (->sexp f))
13 (format t "Coefficient: ~S~%" c)
14 (format t "Division count: ~S~%" division-count)))
[4084]15
16(let ((f (string->poly "x^2" '(x y)))
17 ;;(y-sq (string->poly "y^2" '(x y)))
18 (fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
19 ;;(quotients (cdr (string->poly "[x-y,0]" '(x y))))
20 )
21 (multiple-value-bind (a r c division-count)
22 (step (poly-pseudo-divide f fl))
[4088]23 (format t "Quotients: ~S~%" (poly->string (cons :[ a) '(x y)))
24 (format t "Remainder: ~S~%" (->sexp r '(x y)))
[4084]25 (format t "Coefficient: ~S~%" c)
26 (format t "Division count: ~S~%" division-count)))
Note: See TracBrowser for help on using the repository browser.