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@ 4458

Last change on this file since 4458 was 4458, checked in by Marek Rychlik, 8 years ago

* empty log message *

File size: 750 bytes
Line 
1(in-package :division)
2
3(proclaim '(special f fl))
4
5(setf 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#+nil
11(multiple-value-bind (f c division-count)
12 (normal-form f fl)
13 (format t "Quotient: ~S~%" (->sexp f))
14 (format t "Coefficient: ~S~%" c)
15 (format t "Division count: ~S~%" division-count))
16
17(multiple-value-bind (a r c division-count)
18 (poly-pseudo-divide f fl)
19 (format t "Quotients: ~S~%" (poly->string (cons :[ a) '(x y)))
20 (format t "Remainder: ~S~%" (->sexp r '(x y)))
21 (format t "Coefficient: ~S~%" c)
22 (format t "Division count: ~S~%" division-count))
Note: See TracBrowser for help on using the repository browser.