https://github.com/cran/pracma
Revision 63e8a52ae6668e736720c89691352d6dc3bc9eb1 authored by HwB on 17 January 2012, 00:00:00 UTC, committed by Gabor Csardi on 17 January 2012, 00:00:00 UTC
1 parent 3f1c6b4
Raw File
Tip revision: 63e8a52ae6668e736720c89691352d6dc3bc9eb1 authored by HwB on 17 January 2012, 00:00:00 UTC
version 0.9.6
Tip revision: 63e8a52
polyadd.R
##
##  p o l y m u l . R  Test suite
##


polyadd <- pracma::polyadd

identical(polyadd(c(1, 1, 1), 1), c(1, 1, 2))
identical(polyadd(c(1, 1, 1), c(0, 1)), c(1, 1, 2))
identical(polyadd(c(0.5, 1, 1), c(0.5, 1, -1)), c(1, 2, 0))
identical(polyadd(c(0.5, 1, 1), c(-0.5, -1, 1)), c(2))
identical(polyadd(c(0, 0, 1, 2, 2), c(0, 1, 2, 3, 4)), c(1, 3, 5, 6))
back to top