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/test8.lisp@ 4557

Last change on this file since 4557 was 4463, checked in by Marek Rychlik, 9 years ago
File size: 665 bytes
RevLine 
[4447]1(in-package :polynomial)
[4463]2
[4447]3(proclaim '(special p0 q0 p q p+q-good p+q-risky))
4
[4463]5(setf p0 (alist->poly (reverse '(((2 0 0) . 2) ((1 1 0) . 1) ((1 0 0) . 1) ((0 1 0) . -1) ((0 0 0) . 2)))))
6(setf q0 (alist->poly (reverse '(((2 0 0) . 2) ((0 1 0) . -1) ((0 0 0) . 2)))))
[4447]7
8(setf p (poly-termlist p0))
9(setf q (poly-termlist q0))
10
[4463]11(setf p+q-good (mapcar #'->list (slow-add (mapcar #'copy:copy-instance p) (mapcar #'copy:copy-instance q) #'lex> #'add-to)))
[4447]12
[4463]13(setf p+q-risky (mapcar #'->list (fast-and-risky-add (mapcar #'copy:copy-instance p) (mapcar #'copy:copy-instance q) #'lex> #'add-to)))
[4447]14
[4463]15(assert (equal p+q-good p+q-risky) nil "Two methods gave different results.")
Note: See TracBrowser for help on using the repository browser.