Method: SyMath::Poly::DUP#diff
- Defined in:
- lib/symath/poly/dup.rb
#diff ⇒ Object
Fast differentiation of polynomial
430 431 432 433 434 435 436 |
# File 'lib/symath/poly/dup.rb', line 430 def diff d = degree res = @arr.each_with_index.map { |e, i| e*(d - i) } res.pop return new_dup(res) end |