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.

Changeset 4458 for branches


Ignore:
Timestamp:
2016-06-13T20:41:57-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/test1.lisp

    r4110 r4458  
    11(in-package :division)
    22
     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      )
    310#+nil
    4 (let ((f (string->poly "x^2" '(x y)))
    5       ;;(y-sq (string->poly "y^2" '(x y)))
    6       (fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
    7       ;;(quotients (cdr (string->poly "[x-y,0]" '(x y))))
    8       )
    9   (multiple-value-bind (f c division-count)
    10       (step (normal-form f fl))
    11     (format t "Quotient:        ~S~%" (->sexp f))
    12     (format t "Coefficient:     ~S~%" c)
    13     (format t "Division count:  ~S~%" division-count)))
     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))
    1416
    15 (let ((f (string->poly "x^2" '(x y)))
    16       ;;(y-sq (string->poly "y^2" '(x y)))
    17       (fl (cdr (string->poly "[x+y,x-2*y]" '(x y))))
    18       ;;(quotients (cdr (string->poly "[x-y,0]" '(x y))))
    19       )
    20   (multiple-value-bind (a r c division-count)
    21       (poly-pseudo-divide f fl)
    22     (format t "Quotients:        ~S~%" (poly->string (cons :[ a) '(x y)))
    23     (format t "Remainder:        ~S~%" (->sexp r '(x y)))
    24     (format t "Coefficient:     ~S~%" c)
    25     (format t "Division count:  ~S~%" division-count)))
     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 TracChangeset for help on using the changeset viewer.