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

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